0

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!

1 Answer 1

1

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
6
  • It's not working now for some reason.
    – Steve
    Commented Sep 15, 2012 at 13:44
  • What happens instead?
    – fuxia
    Commented Sep 15, 2012 at 14:00
  • Sorry, just a 404 error.
    – Steve
    Commented Sep 16, 2012 at 7:06
  • Does the URL change?
    – fuxia
    Commented Sep 16, 2012 at 7:52
  • No, it remains. The incorrect format is domain.com/postname - it should be domain.com/category/postname.
    – Steve
    Commented Sep 17, 2012 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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