3

In my blog, I used the Day and name permalink structure for many days. Recently I came to know the SEO tips and made the permalink structure to Post name.

So I migrated from:

http://nishachor.com/%year%/%monthnum%/%day%/%postname%/

to:

http://nishachor.com/%postname%/

It's very simple for me.

But not for the WordPress. I have many posts interlinked with each other, hand coded in posts. And their paths're in archive structure. Now in post name structure they are producing 404 error.

I used the redirection plugin, but doing a 301 redirection as mentioned above (from & to), is not working for me. I cleared my WP Super Cache's cached files and the browser's too.

In Yoast's SEO Plugin I got another permalink redirection, but not the one I want.

Please remember that, I don't have any structure like: domain.com?p=2 or something like that. I just want the archive portion in the URL (%year%/%monthnum%/%day%) should be removed and my posts to be loaded.

To me both the structure are very simple and should redirect from one to another, as they both are in a common platform. But why the permalink structure changing won't redirect itself? Now I need to edit each and every page to edit the hand-coded links. :(

The question is: How can I solve the problem regarding permalink structure day and name to post name?

0

1 Answer 1

4

You could use a redirect in your server/site configuration, for example a RedirectMatch in your .htaccess:

RedirectMatch permanent ^/\d\d\d\d/\d+/\d+/(.*) /$1
1
  • Thanks @toscho. I'm thinking to proceed for it. But for assurance of well being, I've edited some old links as %postname%. If the .htaccess edit redirects me from archive url to post url, then I want the assurance that it'll not affect if it found the %postname% url by default. Thanks in advance. May 8, 2013 at 11:10

Your Answer

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

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