How To Force Apache To Use www In The Domain Name

Published Date Author: , Posted April 19th, 2011 at 1:52:51am
1
2
3
4
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.YourDomain.com
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^.*$ http://www.YourDomain.com%{REQUEST_URI} [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.YourDomain.com
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^.*$ http://www.YourDomain.com%{REQUEST_URI} [R=301,L]

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.