RewriteCond %{HTTP_HOST} ^www\.(.+)\.(com|net|org|edu|info) [NC] RewriteRule ^(.*) http://$1.$2 [L,R=301] Something like this that actually works is what I need.
Something like that ? RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] Code (markup):
Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Code (markup): Should redirect every domain (and subdomains) to the WWW version.