1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

301 Redirecting Whole SIte

Discussion in 'Site & Server Administration' started by crystak, Apr 13, 2009.

  1. #1
    How could I 301 redirect a domain to another? I just want when someone types in myoldsite.com for example to be redirected to mynewsite.com, I don't care about the other pages for now.
    SEMrush
    I found this query on a website and I put it in the .htaccess of the old domain but it didn;t work:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://mynewsite.com/$1 [R=301,L]

    Any help? TIA!
     
    crystak, Apr 13, 2009 IP
    SEMrush
  2. jestep

    jestep Prominent Member Premium Member

    Messages:
    3,661
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Who is the domain registered with. You can usually to a 301 redirect from the registrar. I know that godaddy, register.com and probably most others support this.
     
    jestep, Apr 13, 2009 IP
  3. kailash

    kailash Well-Known Member

    Messages:
    1,251
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    100
    #3
    Try following:

    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    Kailash
     
    kailash, Apr 13, 2009 IP