htaccess make url without www

Discussion in 'Apache' started by crivion, Mar 17, 2009.

  1. #1
    crivion, Mar 17, 2009 IP
  2. seoz

    seoz Banned

    Messages:
    229
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    seoz, Mar 17, 2009 IP
  3. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #3
    hmm thanks but not working

    here's all code

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName user.com
    AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

    RewriteEngine on
    RewriteCond %{http_host} ^http://www.domain.com [nc]
    RewriteRule ^(.*)$ domain.com$1 [r=301,nc]
     
    crivion, Mar 17, 2009 IP
  4. internetstromer

    internetstromer Member

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #4
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain.com
    RewriteRule (.*) http://domain.com/$1 [R=301,L]

    This should work buddy check it out ;)
     
    internetstromer, Mar 17, 2009 IP