www and non www redirection help please

Discussion in 'Site & Server Administration' started by Dave Hybrid, Nov 16, 2006.

  1. #1
    Hello,

    After doing some reading i have a few questions.

    I have a load of articles on my blogs, now will google see my site a duplicate if i dont do a redirect?

    How do i setup redirection on windows hosting, I cannot use .htaccess.

    Thanks in advance.

    Dave.
     
    Dave Hybrid, Nov 16, 2006 IP
  2. Sem-Advance

    Sem-Advance Notable Member

    Messages:
    6,179
    Likes Received:
    296
    Best Answers:
    0
    Trophy Points:
    230
    #2
    Google looks at the content to determine if its duplicate.... not where the content resides.
     
    Sem-Advance, Nov 16, 2006 IP
  3. Dave Hybrid

    Dave Hybrid Active Member

    Messages:
    997
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    83
    #3
    Will it count as duplicate then as technically it is isnt it?

    Thanks

    Dave.
     
    Dave Hybrid, Nov 16, 2006 IP
  4. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Its time now for you to switch on linux hosting. ;)
     
    bentong, Nov 16, 2006 IP
  5. Dave Hybrid

    Dave Hybrid Active Member

    Messages:
    997
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    83
    #5
    My host says i can just add code to index.php... not sure if this is the right way to do things though?

    So to clarify... sorry this is all new to me... even though the content is on the same site google will count http://www.domain and http://domain as duplicate content?

    Thanks Guys!

    Dave.
     
    Dave Hybrid, Nov 16, 2006 IP
  6. Dave Hybrid

    Dave Hybrid Active Member

    Messages:
    997
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    83
    #6
    Just found this for all you windows hosters.

    http://support.appliedi.net/article.aspx?id=11287&cNode=7Y6Q2Q

    Basically if you can get your host to install ISAPI-rewrite it can be done.

    It also means MOD rewrite can be done too for URLs.

    Which is a result considering I only just signed up with my current host and moving 12 domains and databases isn't very appealing.
    Dave.
     
    Dave Hybrid, Nov 16, 2006 IP
  7. rederick

    rederick Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Could use some php

    <?php
    if (substr($_SERVER['HTTP_HOST'],0,3) != 'www') {
    	header('HTTP/1.1 301 Moved Permanently'); 
    	header('Location: http://www.'.$_SERVER['HTTP_HOST']
    	.$_SERVER['REQUEST_URI']);
    }
    ?>
    PHP:
    I found some examples here http://www.beyondink.com/howtos/301-redirect.html
     
    rederick, Nov 18, 2006 IP