RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain.tld$ [OR] RewriteCond %{HTTP_HOST} ^www.old-domain.tld$ RewriteRule (.*)$ http://www.new-domain.tld/$1 [R=301,L]
RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain.tld$ [OR] RewriteCond %{HTTP_HOST} ^www.old-domain.tld$ RewriteRule (.*)$ http://www.new-domain.tld/$1 [R=301,L]