Take the 2-minute tour ×

Looking through Google Webmaster Tools, I have a lot of 404s for posts with permalink structure of /%year%/%month%/%day%/%postname%/

I have since changed permalinks to /%category%/%postname%.html

I thought Wordpress could redirect old post URLs to new post URLS, but the old date based URLs are generating 404s.

My .htaccess file is writable, set to 644.

Why is this occurring? Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

WordPress doesn’t catch all old URLs, you have to help it. Add the following code to your .htaccess above the WordPress rewrite rules:

RedirectMatch permanent /\d+/\d+/\d+/(.+)$ /?pagename=$1
share|improve this answer
Blam! Thanks very much toscho! –  Steve Sep 7 '12 at 8:53
It's not working now for some reason. –  Steve Sep 15 '12 at 13:44
What happens instead? –  toscho Sep 15 '12 at 14:00
Sorry, just a 404 error. –  Steve Sep 16 '12 at 7:06
Does the URL change? –  toscho Sep 16 '12 at 7:52

Your Answer


