Pretty Permalinks on Nginx
-
Okay, so I have wordpress up and running on the latest version of Nginx. I did some research and configured the server to handle rewrites, but something is up. I also found a plugin to tell WordPress not to put the index.php in the permalink, like https://example.com/index.php/rest/of/permalink. However, when I set up permalinks without the index.php, I simply get a white page with no source whatsover. If I go back to the settings and enter a custom structure to include index.php in the permalink it works. My site is behind a firewall right now, so there’s no public access, but I was wondering if anyone could help. I can’t figure out if this is an issue with the way the server is handling the rewrites or if it’s something in WordPress.
This is the location block in my config for the rewrites:
location / { # if you're just using wordpress and don't want extra rewrites # then replace the word @rewrites with /index.php try_files $uri $uri/ @rewrites; # pretty permalinks for WordPress if (!-e $request_filename) { rewrite ^.*$ /index.php last; }
I have looked at the http headers, and it does appear that the server is throwing a 404 error, but everything I’ve found on the net, says combining the above config with the nginx compatibility plugin should fix this issue.
Thanks in advance for any help!
Philip
- The topic ‘Pretty Permalinks on Nginx’ is closed to new replies.