SHIROKO Posted February 8, 2014 Share Posted February 8, 2014 Hello, I can't use the URL rewrinting on my Prestashop. The site is installed on a VPS running with nginx and php5-fpm. Does anybody have a working config file please ? Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted February 8, 2014 Share Posted February 8, 2014 I know it's a dumb question, but is mod_rewrite enabled? Have a look at this http://forum.nginx.org/read.php?5,148347 Link to comment Share on other sites More sharing options...
SHIROKO Posted February 8, 2014 Author Share Posted February 8, 2014 Hi Nemo1, I figured it thanks! server { listen *:80; server_name www.mydomain.com *.mydomain.com; root /var/www/www.mydomain.com/web; if ($http_host != "www.mydomain.com") { rewrite ^ http://www.mydomain.com$request_uri permanent; } index index.php index.html; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # Deny all for .htaccess, .htpasswd, .DS_Store (Mac). location ~ /\. { deny all; access_log off; log_not_found off; } rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg last; rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/images_ie/?([^/]+)\.(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last; try_files $uri $uri/ /index.php$is_args$args; error_page 404 /index.php?controller=404; location ~* \.(gif)$ { expires 2592000s; } location ~* \.(jpeg|jpg)$ { expires 2592000s; } location ~* \.(png)$ { expires 2592000s; } location ~* \.(css)$ { expires 604800s; } location ~* \.(js|jsonp)$ { expires 604800s; } location ~* \.(js)$ { expires 604800s; } location ~* \.(ico)$ { expires 31536000s; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Makes my PrestaShop FLY 1 Link to comment Share on other sites More sharing options...
criacaosites Posted June 30, 2014 Share Posted June 30, 2014 Can you explain with more details, where i make this change? Link to comment Share on other sites More sharing options...
zeki893 Posted September 12, 2014 Share Posted September 12, 2014 Can you explain with more details, where i make this change? i think this goes in your enable sites config Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now