C cgworld Active Member 566 2010 9 0 Jan 29, 2011 #1 hi i am trying to redirect the www version of mt site to non www. i have datalife engine installed . Edited: ok nothing was wrong with my regex, i just had to add it above !! Last edited: Jan 9, 2012
hi i am trying to redirect the www version of mt site to non www. i have datalife engine installed . Edited: ok nothing was wrong with my regex, i just had to add it above !!
D __Doc_ Active Member 186 2009 2 0 Jan 29, 2011 #2 RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC] RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC] RewriteRule ^/(.*)$ http://%1/$1 [R=301,L] ? im not 100% on what you want to do or remove www RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] and always start your htacess with Options +FollowSymLinks RewriteEngine On RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC] RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC] RewriteRule ^/(.*)$ http://%1/$1 [R=301,L] ? im not 100% on what you want to do or remove www RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] and always start your htacess with Options +FollowSymLinks RewriteEngine On RewriteBase /