I am having an issue with enabling minify with the W3TC plugin. I am using a LEMP stack and cloudfront as a CDN, and all of these features, except for the minify work fine. In order to enable fancy permaplinks in WP I added /index.php?q=$uri&$args
to the try_files
line in sites-available and now all of the permalinks are /index.php/postname/
which I think may have something to do with these errors.
1 Answer
Try using the following for your rewrite rules:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
Using that schema, you can manually remove index.php
from your Permalinks settings without breaking anything. Nginx will now check any URI for its existence as a file on the filesystem, and then a directory on the filesystem, and if neither of those return a valid entry it hands off the entire URI to index.php to process, complete with any query strings if any are present.
For W3 Total Cache, try the following: W3 Total Cache Minify Rewrite Error with Wordpress on nginx