Currently I am using the following to redirect my site, note that the redirect does http://example.com/page1.html to http://example2.com/page1.html RewriteEngine On RewriteCond %{HTTP_HOST} ^.*example\.com$ [NC] RewriteRule ^(.*)$ http://example2.com/$1 [R=301,L] Code (markup): Basically my problem is that the subdomains like abc.example2.com get redirected to example2.com also. How can I fix this? Thanks!