how do i redirect my old blog link to new link?

Discussion in 'Apache' started by solidstate, Mar 30, 2013.

  1. #1
    I moved my wordpress blog from blog.domain.info to domain.net
    i own both the tld domains.

    google search already had the posts from old url indexed. if someone clicks in it it shows 404 error.

    how do i redirect the traffic from old url to new url via htaccess. I dont want duplicate post on google. how to make the transition?

    please advice....i am confused with many online articles about htaccess redirect.
     
    Solved! View solution.
    solidstate, Mar 30, 2013 IP
  2. #2
    You can add 301 redirects on all urls on your old subdomain blog.domain.info using below htaccess code
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^blog.domain.info$ [OR]
    RewriteCond %{HTTP_HOST} ^www.blog.domain.info$
    RewriteRule (.*)$ http://www.domain.net/$1 [R=301,L]
    Code (markup):
     
    master1989, Apr 1, 2013 IP
  3. solidstate

    solidstate Well-Known Member

    Messages:
    1,679
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #3
    thanks a lot.
     
    solidstate, Apr 1, 2013 IP