WWW / Non-WWW HTAccess





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]
WWW / Non-WWW HTAccess Dev2Tricks 5 of 5
Force the www. RewriteEngine On RewriteCond %{HTTP_HOST} ^your-site.com [NC] RewriteRule ^(.*)$ http://www.your-site.com/$1 [L,R=301...

Share this

Related Posts

Previous
Next Post »