How to make users come to http://www.site.com when they writing http://site.com ?

Discussion in 'Apache' started by RazUzan, Jul 14, 2006.

  1. #1
    I wont users that writing http://site.com will be transfered to http://www.site.com .

    someone can tell me how to do that please? :)
     
    RazUzan, Jul 14, 2006 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    jestep, Jul 14, 2006 IP
  3. sreyas

    sreyas Well-Known Member

    Messages:
    128
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    If you are on apache server and your hosting provider allow .htaccess then place this on htacces.

    
    RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
    RewriteCond %{HTTP_HOST}   !^$
    RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
    
    Code (markup):
    fully qualified domain name = www.domainname.com
     
    sreyas, Jul 14, 2006 IP
  4. RazUzan

    RazUzan Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you guys :)
     
    RazUzan, Jul 14, 2006 IP
  5. MizzGlass

    MizzGlass Peon

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    A thanks from me too, I always wondered about how to do that and now i know, thanks again!
     
    MizzGlass, Jul 15, 2006 IP
  6. error10

    error10 Peon

    Messages:
    73
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    error10, Jul 16, 2006 IP
  7. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #7
    livingearth, Jul 16, 2006 IP