WEB Website has a redirect on it?

Discussion in 'OT Technology' started by tsi90, Mar 4, 2010.

  1. tsi90

    tsi90 _____

    Joined:
    Oct 20, 2003
    Messages:
    1,624
    Likes Received:
    0
    Location:
    MN
    So I'm kinda new to setting up a website.

    My site automatically goes to http://mysite.com instead of www.mysite.com

    I put some code in htacess to redirect everything to www.mysite.com but there is something that sends www.mysite.com to http://mysite.com causing a never ending loop. I can't figure out how to stop it. I hope that makes sense.

    Also, I don't really care about this unless it effects my seo.
     
  2. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    is that what you used? If not, try it
     
  3. tsi90

    tsi90 _____

    Joined:
    Oct 20, 2003
    Messages:
    1,624
    Likes Received:
    0
    Location:
    MN
    Didn't work either. Before I used:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^([a-z.]+)?site\.com$ [NC]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule .? http://www.%1site.com%{REQUEST_URI} [R=301,L]
     
  4. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.smiliesftw.com$ [NC]
    RewriteRule ^(.*)$ http://smiliesftw.com/$1 [R=301,L]

    demo: www.smiliesftw.com

    Magic.



    Oh wait, he wants the opposite.

    Nevermind :rofl:
     
  5. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,486
    Likes Received:
    69
    Location:
    Sparkopolis
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
     

Share This Page