Changing URI while maintaining old one functional (4 posts)

  1. davidcollantes
    Posted 9 years ago #

    I have been using since the beginning (coming from my very first MT installation) the URI (for archives, single pages) as:


    I would like to drop the /archives part while keeping the old way viable still, so indexed entries and links/trackbacks do not break.

    Does anyone knows how to accomplish this? Any help appreciated.


  2. You'll need to add a rewrite rule into your .htaccess to redirect the old way to the new way. Something like this should work:

    (this should be all one line)
    RewriteRule /archives/(.*) http://yoursite.com/$1 [R=301,L]

    Then just change your permalink configuration to the new way.

  3. davidcollantes
    Posted 9 years ago #

    Excellent, that works just fine. I also found out (after I did it just like you proposed) that there is a plugin that does it as well. It is:


    Thank you much, Otto!

  4. The migration plugin is much more flexible, and I recommend it if you are doing anything more complex than the above, however for simple changes like this one, the RewriteRule is a) faster and b) causes less load on your site. So use those when you can, but if you can't, that plugin is a good choice.

Topic Closed

This topic has been closed to new replies.

About this Topic