Advertisement
Guest User

Untitled

a guest
May 29th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
  2. # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
  3. # http://www.prestashop.com - http://www.prestashop.com/forums
  4.  
  5. <IfModule mod_rewrite.c>
  6. <IfModule mod_env.c>
  7. SetEnv HTTP_MOD_REWRITE On
  8. </IfModule>
  9.  
  10. RewriteEngine on
  11.  
  12.  
  13. #Domain: localhost
  14. RewriteRule . - [E=REWRITEBASE:/prestashop/]
  15. RewriteRule ^api$ api/ [L]
  16.  
  17. RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
  18.  
  19. # Images
  20. RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
  21. RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
  22. RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
  23. RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
  24. RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
  25. RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
  26. RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
  27. RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
  28. RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
  29. RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
  30. # AlphaImageLoader for IE and fancybox
  31. RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
  32.  
  33. # Dispatcher
  34. RewriteCond %{REQUEST_FILENAME} -s [OR]
  35. RewriteCond %{REQUEST_FILENAME} -l [OR]
  36. RewriteCond %{REQUEST_FILENAME} -d
  37. RewriteRule ^.*$ - [NC,L]
  38. RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
  39. </IfModule>
  40.  
  41. AddType application/vnd.ms-fontobject .eot
  42. AddType font/ttf .ttf
  43. AddType font/otf .otf
  44. AddType application/x-font-woff .woff
  45. <IfModule mod_headers.c>
  46. <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
  47. Header add Access-Control-Allow-Origin "*"
  48. </FilesMatch>
  49. </IfModule>
  50.  
  51. #If rewrite mod isn't enabled
  52. ErrorDocument 404 /prestashop/index.php?controller=404
  53.  
  54. # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement