It looks like your’e missing the subdirectory part relative to the root
setting, try this instead:
try_files $uri $uri/ /wordpress/index.php?$args;
and you shouldn’t need the q=$uri
part.
For subdirectories dir1
and dir2
, you could wrap the try_files
with locate
blocks, something like:
location /dir1/ {
try_files $uri $uri/ /dir1/index.php?$args;
#...
}
location /dir2/ {
try_files $uri $uri/ /dir2/index.php?$args;
#...
}
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
- Enable Minify in W3Total Cache using NGINX [closed]
- 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?
- After updage wordpress 4.4 to 4.5 nginx config works not properly
- 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
- How does WordPress handle permalinks?
- Get page permalink without wpurl
- Can I use REST-API on plain permalink format?
- How to change ‘with_front” key from an existing custom post type?
- Post titles not letting me use 2 consecutive dashes in permalink
- Make post slug have priority over category slug
- Adding anchor to paginate_links + Safari anchor bug
- How to stop permalink redirects for a particular slug
- 404 on category.php pagination
- flexible rewrite ‘ramble’ URLs with WordPress
- Posts not working on windows after changing permalinks
- Custom permalink structure
- How to get rid of index.php?
- Relative or Absolute Paths for Flash Video Player Files
- Remove Custom Taxonomy Slug from Permalink
- WordPress Links Not Working After Migration
- Migrating WordPress blog to New Webhosts, something is adding a # and gibberish
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- Adding File Extensions to Attachment Page Permalinks
- Permalink /%category%/%postname%/ returns 404 on OSX
- breadcrumbs & rel=”nofollow”
- Use Regular Expression to get tag from permalink url during wp_rewrite in generate_rewrite_rules
- Permalinks for pages
- Programatically changing post’s permalink when identical post type is published
- Is there a link parameter that will show me all my published pages?
- Add prefix to page URL based on the page template
- Permalink /%postname%/ doesn’t work
- How to show permalink auto when type text in post tiltle?
- Accessing Subdirectories in WordPress Install
- Permalink for custom post type
- Change Permalink of attachment page
- Custom permalinks in WordPress
- How can I say if a URL is a post, page, or taxonomy archive?
- cannot link a external url, present page url acting as parent url
- add_rewrite_rule on default post type
- how to find duplicated permalinks?
- Conditional Permalink based on category?
- Permalink Custom Page Template
- How do i get post thumbnail using attachment code
- permalink error when modifying sanitize_title_with_dashes function
- The requested URL was not found on this server [closed]
- How to create posts or pages with the names in wordpress?
- Xampp 7.3.3 fresh install of WordPress 404 pages unless permalink is set to plain
- Make the blog page a child of another page and rewrite the blog url
- Extending page urls without getting a 404
- Permalink conflict with React Router in subfolder
- 404 on pretty permalinks when serving via HTTPS
- How to experiment with permalink structure on a select number of posts
- In a multisite, how can I get posts from one site and display their permalinks in another site?
- Why does page for hierarchical taxonomy parent term go 404?
- Custom permalink gives 404 error only in some pages
- Can I link to content dynamically from a page to a new page?
- Question About Permalink in wordpress
- Create new URL structure for custom post types
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Remove index.php from URL (WP installed in subdirectory)
- Page returns 404 for specific permalink
- Single.php not loading when permalink only contains date information
- WooCommerce product permalink changed
- Different Permastruck Between Ajax Request & Normal Request
- Imported posts using wrong domain name
- Problem with multiple tags in URL
- Custom Permalinks and filters?
- Custom WP permalink structure
- 404 error on second page load for child-pages
- Permalink structure as code in back-end?
- Internal Server Error every time I push up my WordPress Project to Heroku
- WordPress custom permalinks, pages are now 404
- WordPress home page showing 404 error
- Is it posible to translate a url prefix?
- AllowOveride All causes assetts and Admin Urls to 404
- Page permalinks are http but show up as https?
- 301 Redirect posts to newly added categories
- How to have category/subcategory/posttitle/ permalinks?
- Permalink settings are stuck on https, will not update to http