How to redirect from non www address to the full www address?

Discussion in 'Apache' started by CuXe, May 22, 2006.

  1. #1
    Hello!,

    I've been checking my page rank for a few days now and i noticed that google gives a lower PR to my homepage when its typed without the "www" in the address bar... and it gives a higher PR to my domain when its typed including the "www" (full URL). I tried modifying my .htaccess file (301 redirect) using the following settings:

    redirect 301 /www/index.html http://www.sameURL.com/index.html

    I'm doing something wrong here because I dont get redirected to the full URL address. the "/www/" is the folder where my site is hosted and i'm redirecting it to the full URL... does this make any sense? If i type my URL like "http://mysite.com" my PR is 3 but if I type it like "http://www.mysite.com" my PR is 4!...
    Is there anyway to consolidate my url and PR?
     
    CuXe, May 22, 2006 IP
  2. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #2
    change it to this one.

     
    bentong, May 22, 2006 IP
  3. CuXe

    CuXe Peon

    Messages:
    198
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thats exactly the .htaccess piece of code ive been looking 4, thanks!....
    works like a charm!
     
    CuXe, May 22, 2006 IP
  4. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4

    looks like he cant search for it as it was repeatedly dispalyed here :D
     
    theblight, May 25, 2006 IP