The MU forums have moved to WordPress.org

Redirect old blog address to new address (13 posts)

  1. blogjunkie
    Member
    Posted 17 years ago #

    Hi, I created oldblog.mydomain.com but after a while I decided that I would rather prefer newblog.mydomain.com as the URL. How can I redirect oldblog.mydomain.com to newblog.mydomain.com? I tried a simple .htaccess redirect but it didn't work.

    Thanks in advance for your help.

  2. corourke
    Member
    Posted 17 years ago #

    If this is something just for you and not others, I'd assign a theme only you have access to and then edit a page template to have a html redirect and set that page as the front of that blog only.

    I suppose you could always put together a quick plugin to do that for any blog so if it's deleted it sets a 7 or 14 day delay before expiring and then the user could enter in a new address to forward to (with automatic html redirect enabled to boot)

  3. blogjunkie
    Member
    Posted 17 years ago #

    Hi corourke, thanks for that. I hadn't thought about that option. I'd still prefer to do it invisibly though.

    I found a thread here that has the answer to something similar through .htaccess. I'm hopeless at .htaccess and mod_rewrite, can someone help me adapt the answer from there please?

  4. blogjunkie
    Member
    Posted 17 years ago #

    *bump*

    Is everyone on holiday?

  5. blogjunkie
    Member
    Posted 17 years ago #

    I tried the following in the .htaccess file in the wpmu install directory:

    RewriteRule ^oldblog.mydomain.com/(.*) http://newblog.mydomain.com/$1

    but it didn't work. I also tried

    RewriteCond %{HTTP_HOST} ^oldblog.mydomain.com$ [NC]
    RewriteRule ^(.*)$ http://newblog.mydomain.com/$1 [L]

    but it still doesn't work. I think I'm going about it the wrong way. Someone help please...

  6. andrea_r
    Moderator
    Posted 17 years ago #

    "Is everyone on holiday?"

    Yes. Christmas and New Year's here in North America and the most frequent posters celebrate these things.

  7. strixy
    Member
    Posted 17 years ago #

    How about backing up your database on the old blog.

    Create the new blog as you normally would.

    Import the database from the old blog into the new blog.

    Delete old blog.

  8. mysticwolfpress
    Member
    Posted 16 years ago #

    Doesn't solve the problem strixy. :)

    The issue is NOT moving the information, but the fact that the OLD blog url is plastered all over the internet and will still get hits, so THOSE folks need to be automatically redirected to the NEW blog, preferably without them knowing that it even happened.

    I have the same issue and I'm a bit disappointed that in a year noone has answered this guys question.

    ANY clues?

    Robert Morgen:)

  9. MrBrian
    Member
    Posted 16 years ago #

    It's called a 301 redirect. Google it

  10. Trent
    Member
    Posted 16 years ago #

    I found the 301's also work best near of the top of your .htaccess as well.

  11. mysticwulf
    Member
    Posted 15 years ago #

    Hey MrBrian,
    Thanks for the NON answer.

    A 301 works great if you're moving one (1) url to one (1) other url.

    How does it work in MU when I need to move several?????

  12. MrBrian
    Member
    Posted 15 years ago #

    Don't be rude, this is a question barely related to WPMU. You need someone to write a htaccess rewrite rule for you, try another forum with people that know more about mod_rewrite rules.

  13. tdjcbe
    Member
    Posted 15 years ago #

    Or do a search for "sunrise.php" here in the forums as Donncha dropped a few hints on how to do this way back when. (He couldn't tell us as it was something coded specifically for wp.com.)

    There's actually a bunch of ways. A list of redirects in the htaccess file would probably be the easiest but would really suck. You could always set up a theme specifically for the old site that contained nothing but an index.php file redirecting to the new one. Others come to mind.

About this Topic

  • Started 17 years ago by blogjunkie
  • Latest reply from tdjcbe