Rule not redirecting .co.uk to .com
- by bateman_ap
I have been trying to get my site, when a visitor goes to .co.uk to be automatically redirected to .com. As well as if they go to domain.com to be taken to www.domain.com
I have the code below in my httpd.conf, it appears to be working with domain.com to www.domain.com but not domain.co.uk or www.domain.co.uk to www.domain.com
RewriteEngine on
RewriteBase /
RewriteCond %{http_host} ^domain.com [NC,OR]
RewriteCond %{http_host} ^domain.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC]