jasonc Posted June 12, 2011 Share Posted June 12, 2011 I have three domains and wish to rewrite the url so it permanently uses the www.siteB.com address as the prefered domain name. my .htaccess file is like so.. RewriteEngine on RewriteCond %{HTTP_HOST} ^siteA.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.siteA.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^siteB.com$ [OR] RewriteCond %{HTTP_HOST} ^www.siteC.com$ [OR] RewriteCond %{HTTP_HOST} ^siteC.com$ RewriteRule ^(.*)$ "http\:\/\/www.siteB\.com$1" [R=301,L] Link to comment https://forums.phpfreaks.com/topic/239106-rewrite-url-for-multiple-domains/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.