Guest User

Nginx + Prestashop 1.5 rewrite rules V2

a guest
Nov 13th, 2012
1,474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
  2.  
  3.         rewrite "^/c/([0-9]+)(\-[_a-zA-Z0-9-]*)/(.*)\.jpg$" /img/c/$1$2.jpg last;
  4.         rewrite "^/c/([_a-zA-Z-]+)/(.*)\.jpg$" /img/c/$1.jpg last;
  5.  
  6.         rewrite "^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/(\P{M}\p{M}*)*\.jpg$" /img/p/$1-$2$3.jpg last;
  7.         rewrite "^/([0-9]+)\-([0-9]+)/(\P{M}\p{M}*)*\.jpg$" /img/p/$1-$2.jpg last;
  8.         rewrite "^/([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$1$2.jpg last;
  9.         rewrite "^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$1$2$3.jpg last;
  10.         rewrite "^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$1$2$3$4.jpg last;
  11.         rewrite "^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last;
  12.         rewrite "^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last;
  13.         rewrite "^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last;
  14.         rewrite "^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last;
  15.         rewrite "^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/(\P{M}\p{M}*)*\.jpg$" /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last;
  16.  
  17.         rewrite "^/([0-9]+)\-(\P{M}\p{M}*)+\.html(.*)$" /index.php?controller=product&id_product=$1$3 last;
  18.         rewrite "^/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$" /index.php?controller=category&id_category=$1$3 last;
  19.         rewrite "^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$" /index.php?controller=product&id_product=$2$4 last;
  20.         rewrite "^/([0-9]+)__([a-zA-Z0-9-]*)(.*)$" /index.php?controller=supplier&id_supplier=$1$3 last;
  21.         rewrite "^/([0-9]+)_([a-zA-Z0-9-]*)(.*)$" /index.php?controller=manufacturer&id_manufacturer=$1$3 last;
  22.         rewrite "^/content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$" /index.php?controller=cms&id_cms=$1$3 last;
  23.         rewrite "^/content/category/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$" /index.php?controller=cms&id_cms_category=$1$3 last;
  24.         rewrite "^/module/([_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)$" /index.php?fc=module&module=$1&controller=$2 last;
  25.  
  26.  
  27.         rewrite ^/page-non-trouvee$ /index.php?controller=404 last;
  28.         rewrite ^/adresse$ /index.php?controller=address last;
  29.         rewrite ^/adresses$ /index.php?controller=addresses last;
  30.         rewrite ^/authentification$ /index.php?controller=authentication last;
  31.         rewrite ^/meilleures-ventes$ /index.php?controller=best-sales last;  
  32.         rewrite ^/panier$ /index.php?controller=cart last;
  33.         rewrite ^/contactez-nous$ /index.php?controller=contact-form last;
  34.         rewrite ^/bons-de-reduction$ /index.php?controller=discount last;
  35.         rewrite ^/suivi-commande-invite$ /index.php?controller=guest-tracking last;
  36.         rewrite ^/historique-des-commandes$ /index.php?controller=history last;
  37.         rewrite ^/identite$ /index.php?controller=identity last;
  38.         rewrite ^/manufacturers$ /index.php?controller=manufacturer last;
  39.         rewrite ^/mon-compte$ /index.php?controller=my-account last;
  40.         rewrite ^/nouveaux-produits$ /index.php?controller=new-products last;
  41.         rewrite ^/commande$ /index.php?controller=order last;
  42.         rewrite ^/details-de-la-commande$ /index.php?controller=order-follow last;
  43.         rewrite ^/commande-rapide$ /index.php?controller=order-opc last;
  44.         rewrite ^/avoirs$ /index.php?controller=order-slip last;
  45.         rewrite ^/mot-de-passe-oublie$ /index.php?controller=password last;
  46.         rewrite ^/promotions$ /index.php?controller=prices-drop last;
  47.         rewrite ^/recherche$ /index.php?controller=search last;
  48.         rewrite ^/plan-du-site$ /index.php?controller=sitemap last;
  49.         rewrite ^/magasins$ /index.php?controller=stores last;
  50.         rewrite ^/supplier$ /index.php?controller=supplier last;
  51.  
  52.         rewrite ^/page-not-found$ /index.php?controller=404 last;
  53.         rewrite ^/address$ /index.php?controller=address last;  
  54.         rewrite ^/addresses$ /index.php?controller=addresses last;
  55.         rewrite ^/authentication$ /index.php?controller=authentication last;
  56.         rewrite ^/best-sales$ /index.php?controller=best-sales last;
  57.         rewrite ^/cart$ /index.php?controller=cart last;
  58.         rewrite ^/contacts$ /index.php?controller=contact-form last;
  59.         rewrite ^/discount$ /index.php?controller=discount last;
  60.         rewrite ^/guest-tracking$ /index.php?controller=guest-tracking last;
  61.         rewrite ^/order-history$ /index.php?controller=history last;
  62.         rewrite ^/identity$ /index.php?controller=identity last;
  63.         rewrite ^/manufacturers$ /index.php?controller=manufacturer last;
  64.         rewrite ^/my-account$ /index.php?controller=my-account last;
  65.         rewrite ^/new-products$ /index.php?controller=new-products last;
  66.         rewrite ^/order$ /index.php?controller=order last;
  67.         rewrite ^/order-follow$ /index.php?controller=order-follow last;
  68.         rewrite ^/quick-order$ /index.php?controller=order-opc last;
  69.         rewrite ^/order-slip$ /index.php?controller=order-slip last;
  70.         rewrite ^/password-recovery$ /index.php?controller=password last;
  71.         rewrite ^/prices-drop$ /index.php?controller=prices-drop last;  
  72.         rewrite ^/search$ /index.php?controller=search last;
  73.         rewrite ^/sitemap$ /index.php?controller=sitemap last;
  74.         rewrite ^/stores$ /index.php?controller=stores last;  
  75.         rewrite ^/supplier$ /index.php?controller=supplier last;
Advertisement
Add Comment
Please, Sign In to add comment