I have old urls that are no longer there ie www.site.com/xdirectory/13/ that are redirecting to a single blog post. I did have redirect plugin installed but I have no redirects set and I even disabled it. I’ve checked .htaccess and don’t see anything there. I have no idea why it’s doing this and I can’t find the reason why. If I got to a random URL without /directory/ it just goes to 404 but for some reason anything in /xdirectory/ redirects to a post?
Can someone please help me with what other steps I can take to find the route of the problem? I’d rather not openly post the URL here. I wonder if it’s something I did but don’t remember in a redirect and now I can’t remove it.
[ad_2]
This is known as the “guessing feature” and does what it sounds like. WP tries to guess the correct URL thinking it could be a typo. This is core WP functionality.
You can add this to your functions.php to disable it:
add_filter( ‘redirect_canonical’, ‘__return_false’ );