WordPress.org

Forums

Legacy URLs -- how to handle? (2 posts)

  1. o2b
    Member
    Posted 8 years ago #

    I'm migrating a 6-year-old site into WordPress. There isn't a ton of content, but there are some articles whose URLs would be missed if they just disappeared. I could keep placeholder files at those locations to do the redirecting, but I'm wondering if there's a more graceful way to do this.

    For example, I have a WP entry at foo.com/wordpress/title/, which corresponds to content formerly at foo.com/articles/title/ ("articles" isn't constant, there are multiple legacy directories).

    What's the best way to make the old URL point to the new one (invisibly preferably)?

  2. ColdForged
    Member
    Posted 8 years ago #

    You will likely need to create some mod_rewrite rules to silently redirect each of those legacy directories to your new permalink format. Something like the following in .htaccess above your WordPress rewrite rules:

    RewriteRule ^articles/?$ /wordpress/$1 [QSA]

Topic Closed

This topic has been closed to new replies.

About this Topic