1

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?

1
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.

2
  • What I meant was that before Wordpress displays the 404 page, it tries to find urls that are similar and if one is found, it redirects to that instead of throwing a 404......wordpress tries to correct spelling mistakes before throwing a 404 Sep 2 '11 at 9:55
  • The code has been revised above. Sep 2 '11 at 10:35
0

Its because of your theme your theme maybe have 404 page or function in functions.php you can remove it if you want check : http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.