Return to Snippet

Revision: 55398
at February 5, 2012 05:44 by pruntrut


Initial Code
Force the www.

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

Remove the www.

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

Initial URL

                                

Initial Description

                                

Initial Title
htaccess force www - no www

Initial Tags

                                

Initial Language
HTML