Redirect how to?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ComputerVitals
    Senior Member
    • Oct 2005
    • 541
    • 3.8.x

    Redirect how to?

    When someone comes to my site on computervitals.com
    I need them redirected to www.computervitals.com


    If they log in on computervitals.com and click login, it will log them in and redirect them back to computervitals.com and not be logged in. But if you then put the www. in front you will be logged in.

    I think there is a way to do this via htaccess but I dont know how.
  • ComputerVitals
    Senior Member
    • Oct 2005
    • 541
    • 3.8.x

    #2
    I think I have it.
    seem like all my urls are now being redirected.

    I used
    Code:
    RewriteEngine on
    rewritecond %{http_host} ^computervitals.com          [nc]
    rewriterule ^(.*)$ http://www.computervitals.com/$1   [r=301,nc]
    
    rewritecond %{http_host} ^computervitals.net          [nc]
    rewriterule ^(.*)$ http://www.computervitals.com/$1   [r=301,nc]
    
    rewritecond %{http_host} ^www.computervitals.net          [nc]
    rewriterule ^(.*)$ http://www.computervitals.com/$1   [r=301,nc]

    Comment

    Related Topics

    Collapse

    Working...