How to Redirect Permanent to new Blog

Discussion in 'WordPress' started by amitpatel_3001, Mar 3, 2008.

  1. #1
    I was reading this post - http://ma.tt/2008/01/on-matt/ and was interested to know how did matt redirect his old blog and all the inner pages interlinked within the blog posts so quickly? Did he do the job manually or can anyone link me to any source which can explain this job please. I wanted to redirect the whole blog and stuff from http://www.currentwebsite.com/blog/ to another http://www.newblog.com/ please email me with some steps regarding the same.
     
    amitpatel_3001, Mar 3, 2008 IP
    minstrel likes this.
  2. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #2
    You can use .htaccess to do this. Try something along these lines - put an .htaccess file conmtaining these lines into your root folder at http://www.currentwebsite.com:

    
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /blog/
    RewriteRule .* http://www.newblog.com/ ? [R=301,L]
    
    Code (markup):
     
    minstrel, Mar 3, 2008 IP
    amitpatel_3001 likes this.
  3. amitpatel_3001

    amitpatel_3001 Results Follow Patience

    Messages:
    14,074
    Likes Received:
    1,178
    Best Answers:
    0
    Trophy Points:
    430
    #3
    Does this redirect the internal links within the blog posts? I mean my old blog has around 300 posts and do i need to move the posts/images from old to new blog, because on the other case we need to keep hosting the old blog permanently.
     
    amitpatel_3001, Mar 4, 2008 IP
  4. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #4
    I should, Amit. You may need to play with it a bit but it should take any filenames in the old /blog/ directory and add those filenames to the end of http://www.newblog.com/.

    As long as you keep the old permalink structure, it should work fine. If you also want to change the permalink structure, use Dean's Permalinks Migration plug-in.
     
    minstrel, Mar 4, 2008 IP