Remove www. before sitename code

Discussion in 'Bing' started by tigersoft, Sep 8, 2006.

  1. #1
    Hi,

    Now i have find out wich code is used to remove www. before a sitename. After starting a thread http://forums.digitalpoint.com/showthread.php?t=135619 and not get it to work. So here is a code that i have added in .htaccess file and it worked.

    rewriteengine on 
    RewriteCond %{HTTP_HOST} ^www\.sitename\.com 
    RewriteRule ^(.*)$ http://sitename.com/$1 [R=301,L]
    Code (markup):

     
    tigersoft, Sep 8, 2006 IP
  2. Set

    Set Peon

    Messages:
    250
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I just rather add www if its not present.

    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mysite.com$
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
    
    Code (markup):
     
    Set, Sep 8, 2006 IP
  3. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #3
    lemme test it n ill tell u
     
    koolasia, Sep 11, 2006 IP