Jump to content

.htaccess redirect for http://site.com > http://www.site.com


Rhett

Recommended Posts

This is useful for sites that store a cookie for each version of below.. this will redirect all non http://www. users to http://www.site.com, not an issue normally unless users are logging in to an account.

  RewriteEngine On  RewriteCond %{HTTP_HOST} !^http://www.  RewriteRule ^(.*)$ http://http://www.%{HTTP_HOST}/$1 [R=301,L]

Rhett Buck

Exact Servers

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...