Alis .htaccess правельный редирект

Все просто, и сразу к делу

 

 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^a\.com$ [NC]
RewriteRule ^(.*)$ http://www.a.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^b\.com$ [NC]
RewriteRule ^(.*)$ http://www.b.com/$1 [L,R=301]