WordPress Auto-Redirecting on 404

I believe that WordPress will try to find a suitable URL if you enter a wrong one. So I have a page http://www.example.com/products/ and by mistake I enter http://www.example.com/prods/ WordPress will probably automatically redirect.

I think that it is similar to the Multiviews option in apache. Can the WordPress features be turned off?

Related posts

Leave a Reply

2 comments

  1. WordPress doesn’t automatically suggest pages when a 404 occurs. Many themes have a 404.php template file that can effect what happens when an incorrect URL is entered. Maybe your theme has a 404 page. If you don’t want it to interfere, you could try deleting the 404.php.

    REVISION:

    OK, I understand your request now. The best I’ve been able to come up with is to add this to the functions.php file:

    <?php remove_action( 'template_redirect', 'redirect_canonical' ); ?>
    

    This is probably not a good idea, I’m sure it handles more than just suggesting a page when the URL given is a close match. If you want to mess around with the code to see what you can come up with, you can find it canonical.php core file located in wp-includes/canonaical.php.