Nginx (Magento site) permalinks issue
-
Hi
We have a WordPress site running and installed within /info under a Magento e-commerce site.
Unfortunately, whatever we try, we only see 404 errors for any page we want to run at the top level i.e. /info/wordpress-page-here/.
The blog portion, which sites within /info/blog works fine, so /info/blog/wordpress-post-here/ is okay.
In fact anything under a subfolder will work, as long as a rule is manually entered into the config and Nginx restarted.
So ideally it’d be great if the WP users could setup any %postname% to run directly within /info and for it to just work.
If anyone has any ideas it would be very much appreciated.
Kind regards
PGWordPress URL is set as http://XXX.com/info
Permalinks are set as /info/%postname%Part of our Nginx config is as follows:
location /info/blog { alias /home/blog_master/bestecoshop.com/; index index.php; try_files $uri $uri/ /info/index.php?$args; } location ~ ^/info/blog/(.*\.php)$ { ## Catch 404s that try_files miss if (!-e $request_filename) { rewrite / /info/index.php last; } alias /home/blog_master/bestecoshop.com/$1; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; } location /info { # WordPress sitemap # rewrite ^/info/sitemap_index\.xml$ /info/index.php?sitemap=1 last; # rewrite ^/info/([^/]+?)-sitemap([0-9]+)?\.xml$ /info/index.php?sitemap=$1&sitemap_n=$2 last; alias /home/blog_master/bestecoshop.com/; index index.php; try_files $uri $uri/ /info/index.php?$args; rewrite ^/info/?$ /info/blog/ redirect; } location ~ ^/info/(.*\.php)$ { ## Catch 404s that try_files miss if (!-e $request_filename) { rewrite / /info/index.php last; } alias /home/blog_master/bestecoshop.com/$1; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; }
- The topic ‘Nginx (Magento site) permalinks issue’ is closed to new replies.