You are currently browsing the archives for posts tagged as WordPress.
I’ve upgraded several of my blogs to WordPress 2.5. However, I noticed that two of them didn’t handle 404 (Page Not Found) errors properly after the upgrade. Every invalid URL gets redirected to the index page; worse still, they returned a 200 server response code which tells the browser that the URL is valid!
Another bad outcome of this bug is that your sites won’t get verified in Google Webmaster Tools.
This problem only occurs on WordPress blogs that uses a page (instead of the more common latest posts listing) as the front page. So how can we fix this?
If you’re hosting your WordPress blog on a
mod_rewrite-enabled Apache web server, you can use this feature to make your post URLs prettier.
By default, WordPress uses an ugly format like
http://yoursite/?p=795 (this URL is for post #795, just in case you’re wondering). If your server has
mod_rewrite enabled, you can also use more descriptive URLs as suggested by WordPress: