301 redirect?

Discussion in 'Search Engine Optimization' started by peaches, Jan 2, 2007.

  1. #1
    Hey guys, I have read alot that you should always pick one or the other when it comes to www.yoursite.com or yoursite.com

    I have decided to go with the www. however, my question is how do I 301 the non www. url to goto the www. url? I read that you can do it via .htaccess but I havn't been able to actually find out how to do it. Any help would be greatly appreciated!
     
    peaches, Jan 2, 2007 IP
  2. Monty

    Monty Peon

    Messages:
    1,363
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    0
  3. reapr

    reapr Peon

    Messages:
    1,711
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is how I did it and it did it took and update for the PR to transfer ...

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yoursite\.com
    RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L]



     
    reapr, Jan 2, 2007 IP
  4. peaches

    peaches Guest

    Messages:
    181
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    peaches, Jan 9, 2007 IP
  5. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #5
    mjewel, Jan 9, 2007 IP
  6. peaches

    peaches Guest

    Messages:
    181
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I tried that, I got a page isn't redirecting properly.
     
    peaches, Jan 9, 2007 IP
  7. peaches

    peaches Guest

    Messages:
    181
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Can anyone help me at all with this? I would greatly appreciate it. I have been trying to find it on the internet, but I'm just not getting it right for some reason.
     
    peaches, Jan 10, 2007 IP