This happens in redirect_canonical()
.
You can disable that function with:
remove_action('template_redirect', 'redirect_canonical');
But be aware it does a lot more. Too much for my taste …
So there might be side effects.
Related Posts:
- Clash of the rewrites
- Hijacking the URL for filtering
- custom htaccess rewrite rule for page
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Alias ‘wp-content’ directory to something shorter (framework?)
- WordPress .htaccess – route other URLs to another app
- Changing RSS feed URL structure
- add_rewrite_rule fro html to another url not working
- Preserve Domain Alias
- Wildcard forward all posts and pages with few exceptions
- React Router with WordPress
- Is WordPress API visible from PHP file called in htaccess
- How to customize sub-URLs in a wordpress website (.htaccess)
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- Multiple permalink with and without category for same post
- Rewrite URL to get rid of wp-content etc and change URL
- Does WordPress keep track of a post’s URL history and provide automatic redirects?
- Masking wp-content/themes/name/images to just images directory using htaccess
- Using custom/dynamic “slug” for a page
- How to add custom rewrite rule to .htaccess?
- Use subdomain for certain urls
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- How to append a URL parameter to all outbound URLs
- Why does wordpress still strip my query var?
- Remove subfolders from URL
- Custom rewrite rules are sending everything to index.php
- unexpected problem in url rewrite
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- Add_query_arg + two times the same argument?
- Redirecting all old links from previous EE site to new WP site in one go?
- Two “.htaccess” Files Located in Different Directories?
- redirect 301 old url to new url
- Add rewrite rule for rewrite endpoint
- Migrating a page to be an article
- How to get “extended” path info from URL in a plugin
- Issue with using .htaccess to redirect feedburner feed
- How to perform a query at the URL?
- Is there a way to create alias without using htacess, permalinks or delving into code?
- Define orderby in url
- hard flush_rewrite_rules() not regenerating .htaccess
- Is there a ‘rake routes’ for wordpress?
- Cleanup URL for a custom page in wordpress
- WordPress rewrite rules don’t need ^?
- Adding rewrite rules directly to .htaccess file
- WordPress redirects non-existing url to existing ones – how to disable
- Disable Pagination on Pages
- How to rewrite url wordpress?
- WordPress Redirecting Non Category Pages /page/nnn to their Canonical URLs
- How to building pretty URLs to reflect category hierarchy?
- How do I display only the parent page in the url
- “View post” leads to odd URL
- A clean custom rewrite rule for weekly archives
- I want to add a new tag to WordPress URL permastruct
- Add language prefix to permalinks
- URL rewriting: removing the site’s basename for a specific category
- Map secondary domain to other’s virtual subfolder
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- Per Page Permalink Structure for Page Post Type
- Customise particular RSS permalink
- RSS feed rewrite matching wrong rule
- URL renaming issue
- Removing “www” from a site URL
- Adding a query string to only one page url
- Redirect htaccess [closed]
- force www rewrite if wordpress put in a folder
- Weird characters behind every single link and images
- How to use wp rewrite to hide form action url?
- How do I make WordPress revise an .htaccess file a certain way?
- How do I get posts to appear at mydomain.com/blog?
- add_rewrite_rule with optional parameters
- How to change search page url so that it still returns a page when there’s no search query specified?
- Rewrite htacess rule doesn’t work
- Allowing multiple URLs for same Post
- How to create dynamic URLs on WordPress?
- Translatepress taxonomy and custom post type root FIX
- WordPress URL redirect and replace ? question mark
- Custom Params in URL
- Param causing 404
- Get custom posts by segment of the URL
- Add ReWrite from Old Pages to WordPress (remove .php)
- Use Parent Pages for URL Structure without Landing Page
- Fully mask *all* traces of WordPress installation subdirectory?
- Remove Page Slug from URL
- .htaccess RewriteRule to include post type and taxonomy
- How to create short urls for sharing and downloadable content?
- Redirect A URL Pattern In WordPress Using .htaccess
- Rewrite Question
- How to stop WordPress creating URLs that don’t exist
- Stop wordpress to redirecting home page if no page found
- Additional .htaccess rules based on wp page
- Rename page URL
- Changes done to .htaccess are not getting reverted back
- how to rewrite folder name in url to another name
- Lost WordPress website access after changing URL [closed]
- Add rewrite endpoint and .htaccess
- Remove url parameter using wordpress
- Spurious URL structure (Adding extra /0/s)
- WP-Include rewrite directory
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?