The MU forums have moved to WordPress.org

MU redirect to new server, specific issues (4 posts)

  1. slor
    Member
    Posted 16 years ago #

    We have been running a thriving MU install for two years for the newspaper I work for. Unfortunately, all the blogs now have to be moved to a medieval blog system in our new CMS. The contractor has been able to simulate the permalink URL we had in place.

    I have two specific questions:

    Given:

    http://news.ccpblogs.com/2009/04/02/mcconnell-raises-stakes-pitches-new-comprehensive-gambling-bill/

    New URL, after archive import:

    http://www.charlestoncitypaper.com/PressTime/archives/2009/04/02/mcconnell-raises-stakes-pitches-new-comprehensive-gambling-bill

    How do I achieve a custom URL redirect for each sub-domain to translate into the new off-site URL with new directories?

    lunabyte's discourse on this thread is informative...

    You'll have to analyze the request uri, and check against the http host (don't want to screw up someone else's blog), but once that's good you can do a string replace, and then do a 301 header redirect. You would be looking at 4 or 5 lines at most, probably less.

    I used the snippet provided by deltakid.

    if ($_SERVER['SERVER_NAME'] == "news.ccpblogs.com") {
    header("Location: http://www.charlestoncitypaper.com/PressTime/archives/",TRUE,301);
    die();
    }

    But that just redirects all URI requests to the exact URL mentioned above, "http://www.charlestoncitypaper.com/PressTime/archives/"

    How can I use this approach to also append the permalink directories passed in the request?

    i.e. "2009/04/02/mcconnell-raises-stakes-pitches-new-comprehensive-gambling-bill"

    Would it be more effective to come up with a .htaccess rule? How do I craft that for subdomains since they are all being re-written as wildcards, per the old standby instruction?

    Would it be simpler to use the Redirection plugin? From what I've read, that plugin only handles directory and post/page redirection and doesn't address base URL differences.

    We only have 14 blogs, so custom .htaccess rules are not that big of a deal. I'm just trying to find an effective solution that shows Google where the archive posts are now.

    Thanks for any help.

  2. SteveAtty
    Member
    Posted 16 years ago #

    So the old site is going to be off line but you want to basically allow people to follow old links which used to point to the old site and find themselves on the new site?

    I'd be tempted to, on the old site server just to have a simple rewrite rule in the .htaccess file which takes the path and filename part of the requested URL and appends that to the new hostname.

  3. gf8
    Member
    Posted 16 years ago #

    thank

  4. cafespain
    Member
    Posted 16 years ago #

    Try: http://blog.clearskys.net/themes/redirectr-theme/

    You would put http://www.charlestoncitypaper.com/PressTime/archives in the redirect requests to field and make sure the two check boxes are ticked.

    Or a custom htaccess rule would serve just as well (well, better probably :) )

About this Topic