how can I redirect all my url containing www. in from without www? example: http://www.somedom.com becomes http://somedom.com
RewriteEngine on RewriteCond %{http_host} ^http://www.domainname.com [nc] RewriteRule ^(.*)$ domainname.com$1 [r=301,nc]
hmm thanks but not working here's all code # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName user.com AuthUserFile /home/user/public_html/_vti_pvt/service.pwd AuthGroupFile /home/user/public_html/_vti_pvt/service.grp RewriteEngine on RewriteCond %{http_host} ^http://www.domain.com [nc] RewriteRule ^(.*)$ domain.com$1 [r=301,nc]
RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://domain.com/$1 [R=301,L] This should work buddy check it out