Subdomain redirected to domain

Discussion in 'HTML & Website Design' started by Maximallimit, Aug 10, 2009.

  1. #1
    Hi,

    I hope this is the right forum for this.
    I have a blog on a subdomain. I want to transfer that blog on it's on domain, and I don't know what's gonna happen with pages from this site. I've got few pages that rank high for their keywords, so yhe question is, if I redirect subdomain abc.abc.com to abc.com , what happens when someon click on abc.abc.com/page1 ?
    Is there a way to redirect whole site?

    Regards
     
    Maximallimit, Aug 10, 2009 IP
  2. headworker

    headworker Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Either you can redirect whole site to one domain or can redirect each page to specific domain page. You will have to write 301 redirect code in your .htaccess file.
     
    headworker, Aug 10, 2009 IP
  3. Maximallimit

    Maximallimit Peon

    Messages:
    289
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So, if I redirect whole site then any page of that site will be redirected?
     
    Maximallimit, Aug 10, 2009 IP
  4. headworker

    headworker Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, Certainly.
     
    headworker, Aug 10, 2009 IP
  5. dulcificum

    dulcificum Active Member

    Messages:
    535
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Just use htaccess redirects with regex.
     
    dulcificum, Aug 10, 2009 IP
  6. Maximallimit

    Maximallimit Peon

    Messages:
    289
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Is this the right thing to do?

    # BEGIN WordPress
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.abc.abc.com
    RewriteRule (.*) http://www.abc.com/$1 [R=301,L]
    # END WordPress
     
    Maximallimit, Aug 10, 2009 IP
  7. headworker

    headworker Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes, You have written a correct code and It should work :)
     
    headworker, Aug 10, 2009 IP
  8. lufty

    lufty Active Member

    Messages:
    248
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Any kind of redirects can have an effect on your PR though..
     
    lufty, Aug 11, 2009 IP