jasonpc1
06-12-2011, 06:10 PM
RewriteEngine on
RewriteCond %{HTTP_HOST} ^siteA.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.siteA.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^siteA.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.siteB.com$ [OR]
RewriteCond %{HTTP_HOST} ^siteB.com$
RewriteRule ^(.*)$ "http\:\/\/www.siteA\.com$1" [R=301,L]
what i am having problems with is getting the url to rewrite is that were to visit say
www.siteA.co.uk
www.siteA.co.uk
siteA.com
www.siteB.com
siteB.com
and be taken to
www.siteA.com
or say
www.siteA.co.uk/myOtherPage.php
www.siteB.com/myOtherPage.php
and be taken to
www.siteA.com/myOtherPage.php
RewriteCond %{HTTP_HOST} ^siteA.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.siteA.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^siteA.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.siteB.com$ [OR]
RewriteCond %{HTTP_HOST} ^siteB.com$
RewriteRule ^(.*)$ "http\:\/\/www.siteA\.com$1" [R=301,L]
what i am having problems with is getting the url to rewrite is that were to visit say
www.siteA.co.uk
www.siteA.co.uk
siteA.com
www.siteB.com
siteB.com
and be taken to
www.siteA.com
or say
www.siteA.co.uk/myOtherPage.php
www.siteB.com/myOtherPage.php
and be taken to
www.siteA.com/myOtherPage.php