Am I using the .htaccess file correctly on GoDaddy?

Discussion in 'Site & Server Administration' started by uleesgold, Nov 29, 2011.

  1. #1
    I just uploaded it into the top level directly where my index file is, and its not doing what I want it to do. I checked a website for the syntax of removing the www from my website. This is the current contents of the .htaccess file I uploaded:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.mysite.biz$ [NC]
    RewriteRule ^(.*)$ http://mysite.biz/$1 [R=301,L]
    Code (markup):
    Is there some code that needs to be added to the .htaccess file to identify what it is for code to work?

    Wouldn't the top level directory be the right place to put it? (where my index file is)
     
    uleesgold, Nov 29, 2011 IP
  2. uleesgold

    uleesgold Member

    Messages:
    288
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #2
    I just replaced the syntax above with this syntax :

    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L] 
    Code (markup):
    could it be that godaddy does not support this?
     
    uleesgold, Nov 30, 2011 IP