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
Related Posts:
- Changing permalinks gives me 404 errors on nginx
- Setting 404 page in Nginx
- How to remove the index.php in the url?
- Homepage loads but all permalinks are 404 when using nginx & PHP-FPM
- nginx – permalinks with .php in url not working
- Permalinks keep reverting to 404 unless I re-save them
- WordPress installation in subfolder not working with nginx
- WordPress blog posts permalinks giving 404 on nginx
- After updating to 4.8 permalinks will not work (all 404)
- Server Move: All pages leading home
- WordPress Permalinks & Nginx Rewrite Rule Not Working
- How do I fix permalink and media library issues on a LEMP stack?
- Nginx Rewrite Rule:: index.html added to every permalink
- WordPress post-name permalink redirects to site.com
- WordPress Pages Redirecting to Root with WordPress Multisite (Sub-Directory)
- NGINX serve WordPress from sub-path fails with 404, how to fix?
- Losing preview ability: W3 Total Cache + Post name permalinks
- After updage wordpress 4.4 to 4.5 nginx config works not properly
- Nginx url rewrite rule problem
- Multiple sites with pretty permalinks with nginx
- Redirect old /%category%/%postname%/ to just /%postname%/
- WP permalink working, but why content doesn’t display
- permalinks constantly needs re-saving
- wordpress admin panel loop on nginx
- WordPress and NGINX – permalinks are not working with ending slash
- ReWrite Permalink to New Permalink Nginx
- Stop WordPress appending `-2` to the end of my url after i change it
- Removing Parent Page(s) from Permalink
- Removing the redirect after changing a page’s slug
- How to display a public profile page for registered users with custom slug?
- Page begins with number, WordPress adds 2
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- Include Taxonomy slug in post url
- Nice RSS Feed URLs for each custom post type
- Rewrite url / permalink for default archive – yearly / monthly
- Should I use relative or absolute urls when pointing to internal pages
- removed index.php now all pages 404
- WordPress 3.4 Permalinks Redirection Problem
- Apostrophe in permalink results in page not found
- How to get full content including template HTML
- Infinite redirects after changing the permalink of a page
- Permalinks settings page blank
- How to have extra permalink for posts
- Trouble with numeric permalinks after 4.3.1
- Editing Pages Give 404 Error After WordPress Upgrade in Admin Panel
- How to get post object on blog template
- Illegal characters in URLs
- WordPress auto generates small medium and large of an image on upload, how can we guess their links?
- Error updating pages, and linking to pages (permalink error)
- Permalinks dropping after 3-4 weeks with no changes in theme or plugins
- WordPress Sub domain
- How can i have a custom post type with more slugs for each post?
- Create a PHP page to refresh the permalink on a custom table
- Custom permalink for specific category
- Permalink structure between 2 custom post types and a taxonomy
- how to redirect old blog post urls when permalinks are changed
- How to use all tags in post permalinks
- Disable date based archives for all categories except one
- Permalink target for recent post
- How do I reclaim either deleted pages or their permalinks?
- Remove parent page from url
- Remove “attachment/” from the URL of attachment pages
- How do I change the permalink structure without getting 404s?
- how to alter permalink in wordpress?
- Adding User Info to Permalink of User pages – is it neccessary?
- Permalink will not change – it wants to have -2 slug [duplicate]
- Permalinks 404 after Subdirectory to Root Migration
- optional parameter in permalink structure
- Get a link to paged() part?
- Two custom taxonomies in permalink structure
- Blogger To WordPress Permalink Redirection
- get_permalink() gives a certain page link only. how to solve this.?
- What is the simplest way to create a redirect
- How to make different urls for some tags pages
- Adding custom query var to a single post without redirecting to its root slug
- How to change specific permalink in wordpress site?
- assets aren’t loading on a page but loads on others? slug permalink conflict?
- remove SLASH on single_post but KEEP on categories and parent pages
- Fire a code when permalinks updated
- Flush rewrite rules with scheduled event (cron)
- I have a 404 error on all my pages! What do I do?
- All files in public_html, Cannot launch WordPress site via wp-admin
- Extra url paths as variable
- Prevent 301 when a trailing slash added
- Why I had to re-save permalink setting after moving my WordPress site to another hosting provider?
- Permalinks custom base to redirect to archive.php
- How to change URL of my pages?
- get_permalink to an anchor
- Pretty permalinks returning “not found” on localhost and server
- Removing or hiding slug/permalink from htaccess
- WordPress Permalink Problem
- Converting WP Page to use full explicit paths?
- Get post id of permalink for a specific custom post type?
- Update permalinks
- Losing the original URL when using add_rewrite_rule
- W3 Total Cache Minification – Any way to not use php? [closed]
- Permalink issues with Ubuntu Server – Infinite loop & Wrong pages
- How can i edit all posts slug in bulk keeping WP native redirect?
- Post/page without slug
- Standard Htaccess directives disappear by themselves