404 on permanent links with nginx and woocommerce
-
Hi, i’m trying to setup a small shop using WP (spanish) + Woocommerce + nginx but i’m having some troubles setting permanentlinks. There are lots of related post, but none seems to solve my problem.
For Nginx configuration i’ve followed this
server { root /home/xxx/xxxx; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name xxxx; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.php?$args; } error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } }
Permanent link is set to product-base (http://example.com/producto/sample-product/) and link is set ok for each products (x is link to http://example.com/producto/x/) but when click on it, 404 is raise.
Not sure why, but the X product is display ok in the url
http://example.com/?product=x
I’ve also try (without success) changing the try_file line to
try_files $uri $uri/ /index.php?q=$uri&$args;
Thanks in advance. Any other info needed just ask for it.
See you
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘404 on permanent links with nginx and woocommerce’ is closed to new replies.