This worked for me:
remove_action('template_redirect', 'redirect_canonical');
Related Posts:
- How to force a 404 on WordPress
- Redirect Restricted Page to 404
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- Disable WordPress URL auto complete
- Redirect user to original url after login?
- Disable ONLY URL auto complete, not the whole canonical URL system
- How do I programmatically generate a 404?
- User redirect to destination URL after login
- Redirecting WordPress /.htaccess / HSTS / SSL
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- How to setup 301 redirects for multiple query string URLs?
- How do I skip wordpress’s 404 handling?
- Stop unwanted WP redirection to new url
- How does WordPress redirect to WooCommerce shop page? [closed]
- WordPress within a subdirectory of another WordPress environment doesn’t work
- WP redirects all pages from new domain to old domain
- 404 redirection and Google’s index [closed]
- Redirect feed to 404 page
- Check if post is in draft or pending review?
- Does WordPress automatically redirect url without parent slug?
- Why specific file directory fails to redirect but its parent folder succeeds?
- WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]
- How to redirect visitor to a custom URL using PHP code in functions.php
- Deny access to a path (give 403 or 404 response)
- Redirect home to another page with htaccess
- Redirect a page id url but not the page slug
- Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?
- Defining a custom 404 for non-WordPress parts of site
- How to redirect URL with subfolder to the same URL but without subfolder?
- How to redirect a page into file?
- How to redirect after login getting a variable from url (for example with the language)
- How can I replace my primary url globally with a parked one?
- WordPress Auto-Redirecting on 404
- URL redirect problem
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- How to redirect to clean links with this code
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- reducing number of URL Redirects and increasing speed
- URL masking of subdomain to main domain using .htaccess
- Disable WordPress URL auto complete
- Redirect user to original url after login?
- Redirect non existing page to frontpage
- How to redirect a wrong search on my wordpress website to the error 404 page?
- WP page 404 error only on mobile
- store URL global before we redirect
- Force 404 redirect to home?
- WP_List_table with form of method=GET redirects to wrong url after submit
- How can I redirect users on the new 404 page without plugin?
- Redirect old URL (with different post ID) to new URL
- How to redirect an old page url to the homepage
- Dynamic 404 page content while still keeping 404 status code?
- How to fix automatic redirects?
- Redirect to home if page doesn’t exists [duplicate]
- My redirect URL doesn’t show any pages on my website [closed]
- Redirect to parent page if child does not exist
- How to redirect non existent pages/posts in wordpress using htaccess
- Preventing Canonical Redirect for CDN
- How to Redirect WordPress domain.com/?anyword to 404 Page?
- URL redirection
- How do I redirect the browser to 404 page, if no posts are found in home page
- How do i make WordPress return 404 instead of redirecting on misspelled page?
- How to redirect if 404 error in wordpress then redirect 404.php url
- Redirect to /404/
- URL redirect regular expressions redirecting all after first viriable
- Page editing in backend redirecting to 404 page not found with url /post.php
- Disable WordPress URL auto Redirect
- How to get user details by name
- Redirect only PDFs in different folders?
- How to disable WordPress URL autocomplete / recognition?
- using wp_rewrite but keep the original url in the address bar
- How do I skip wordpress’s 404 handling?
- I’ve move my site but URL still goes to the old site
- Redirect based on $_GET parameters
- International characters in slugs to redirect to
- Subpages return 404 server error
- Rewrite rule for incoming urls
- WordPress subfolders htaccess bypassing the root htaccess RewriteRule
- URL Custom Rewrite
- How to handle expired assets/content when user has direct URL
- Why my htacess rewrite return 404?
- How to Redirect Url to homepage?
- Stopping media file redirects
- How to change Ugly link?
- Redirect ignore last URL segment
- Forcing header cache control in 404 pages
- redirect to 404 page
- Redirect certain 404 pages to parent page
- How can I do automatic redirects to canonical URLs as defined by Yoast SEO?
- Redirect of specific words in URL ahead of website migration
- Non-existent URLs/slugs redirect to default Posts page
- My Pages Have Been Redirected Automatically in WordPress. How to Stop It?
- PHP header(Location: …): Force URL change in address bar
- What does HTTP/1.1 302 mean exactly?
- php refresh current page?
- Disable front end to use as CMS only?
- How to redirect non-logged in users to a specific page?
- Host the wp-admin on another domain?
- When I change slug, will WordPress create redirect from the old URL?
- WordPress localhost site redirect to live site
- WordPress redirecting connections on port 8080 to 80