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 […]

Share online:

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

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.