WordPress.org

Ready to get started?Download WordPress

Forums

Transitioning a site to WordPress - how to deal with redirects? (7 posts)

  1. Amanda81
    Member
    Posted 3 years ago #

    Hi there,

    Looking for some advice on how to go about doing something, logically speaking.

    I'm doing some work for an organization that has a website already (a non-CMS site), and I have created a new site for them at http://theirdomain.com/wordpress, which is almost ready to go. We are pretty much ready to "flip the switch" so that their domain points to the WordPress installation (my plan is to mask the subdirectory from their URL using the directions at http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory, leaving out steps 1 and 6).

    But now my question is this: how can I make sure that anyone who lands on one of the pages from the old site (e.g. http://theirdomain.com/someoldpage.html) is automatically forwarded to the homepage of the new site?

    Thanks very much :)

  2. kgagne
    Member
    Posted 3 years ago #

    Hi, Amanda —

    I've had to handle this problem a couple times. Each time, I used the Redirection plugin.

    It helps the new site's pages have similar paths as the old one. For example, I used to have a static file called resevil.html in a folder called psx. Under WordPress, I created a page with the slug psx then a sub-page called resevil. Then I created a redirection rule to strip the .html from all incoming links. That single rule handled 99% of the traffic coming to my site.

    If you don't have a similar strategy laid out, you may need to create redirection rules on a one-by-one basis for each individual page and its new equivalent.

    Let me know if this helps!

    -Ken

  3. Amanda81
    Member
    Posted 3 years ago #

    Thanks for the response, Ken!

    Unfortunately the new site is not set up with a similar structure to the old one, so I'm not sure how much luck I'd have using that method.

    Do you think I could do some kind of top-level redirect in the .htaccess file that would redirect any page not found within the /wordpress folder on the web server so that it automatically goes to the homepage I've set within WordPress?

  4. kgagne
    Member
    Posted 3 years ago #

    Amanda,

    I'm not savvy with editing .htaccess; it would be safer for both of us if I didn't advise on that approach. :-)

    You may still want to take a look at the Redirection plugin, though. Depending on how many pages you need to redirect, it could still prove practical.

    -Ken

  5. bhobbit
    Member
    Posted 3 years ago #

    Hello Ken,

    I am exactly in the case you describe : I need to strip .html from all incoming links, but I don't find how to write the rule. Can you help ?

    Thanks a lot,
    Serge.

  6. kgagne
    Member
    Posted 3 years ago #

    Hi, Serge --

    Using the Redirection plugin I previously referenced, I specified the source URL thusly:

    /(.*).html

    and I have it redirect to here:

    /$1/

    I hope this helps!

    -Ken

  7. bhobbit
    Member
    Posted 3 years ago #

    Hello Ken,

    Actually, I was close to solution but had to issues :
    - an extra backslash in source URL : /(.*)\.html
    - problem to configure path to .htaccess file in Apache module

    Now all works fine.

    Many thanks for your help,
    Serge.

Topic Closed

This topic has been closed to new replies.

About this Topic