having problem with www and non www

Discussion in 'Apache' started by arambo, Apr 1, 2009.

  1. #1
    i just moved my website to leaseweb and i am having problem with the www and non www
    in Firefox 3 when i type www.fileonfire.com it works great and also fileonfire.com works great but in
    ie7 when i type www.fileonfire.com it works great but fileonfire.com it dose not work can someone help me ?
    why in ie7 it dose not work when i type fileonfire.com with no www ???
     
    arambo, Apr 1, 2009 IP
  2. tfbpa

    tfbpa The....Alive

    Messages:
    896
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Have no idea what the cause of that is, but it is better to permanently redirect one version to the other anyway.

    If your server is running on Apache, you can create a .htaccess file and put the following code in there.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^fileonfire.com$
    RewriteRule ^(.*)$ http://www.fileonfire.com/$1 [R=301,L]

    That will permanently redirect fileonfire.com to www.fileonfire.com
     
    tfbpa, Apr 1, 2009 IP
  3. arambo

    arambo Peon

    Messages:
    218
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    where should i store the .htaccess ? i am using plesk 9 with cenots
     
    arambo, Apr 1, 2009 IP
  4. tfbpa

    tfbpa The....Alive

    Messages:
    896
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #4
    in the root folder, where your index page is.

    Also do a search in Google for .htaccess and you will find some helpful info.
     
    tfbpa, Apr 2, 2009 IP
  5. iamcassie

    iamcassie Guest

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    possible reasons
    - you havent cleared your cache
    - your dns settings is pointing www and no-www on two different files

    otherwise, use 301 redirect
     
    iamcassie, Apr 2, 2009 IP
  6. blazinrachel

    blazinrachel Peon

    Messages:
    230
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the same problem i have.
     
    blazinrachel, Apr 2, 2009 IP
  7. Steven_Reiz

    Steven_Reiz Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Also in Google Webmaster Tools you can configure which of those two you want to use. That should help make sure that Google search engine results are consistent - either they all point to "www.fileonfire.com" or they all point to "fileonfire.com", whatever you prefer.
     
    Steven_Reiz, Apr 7, 2009 IP