What I am trying to do is automatically redirect the domain for one of my sites
www.domain1.com
to www.domain2.co.uk
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain1.com\. [NC]
RewriteRule (.*) http://%www.domain2.com\%{REQUEST_URI} [R=301,NC,L]
I have looked over the site for the answer and the above is my code that I edited from another answer, but it doesn't work.
I would like it in a .htaccess file - is this the best way of doing it?
Thanks