WordPress 2.5: 404 Error Handling Fix

Have you upgraded to WordPress 2.5 and facing, improper handling of 404 (Page Not Found) errors? Whenever, an invalid URL is encountered, some users on WordPress 2.5 facing 404 redirection error i.e. instead of generating 404 page, they’re redirected to the index page. WordPress development team is aware of this problem and the patch is already available. But the fix will only be released […]

Have you upgraded to WordPress 2.5 and facing, improper handling of 404 (Page Not Found) errors? Whenever, an invalid URL is encountered, some users on WordPress 2.5 facing 404 redirection error i.e. instead of generating 404 page, they’re redirected to the index page.

WordPress development team is aware of this problem and the patch is already available. But the fix will only be released in WoredPress 2.5.1. You can apply the fix manually by editing the /wp-includes/query.php file.

Search the following code on line 922:

if ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {

....and replace it with the folllowing:

if ( ('page' != get_option('show_on_front') ) || ( $reqpage !== get_option(’page_for_posts’) ) ) { WordPress, WordPress 2.5, Brecker, PHP, 404, 404 Error, Page not found, Tips, Tips and Tricks