Reputation: 57
I have a drupal 6 installation that runs multi sites.
I have a sub domain uk.example.com which now needs to be accessible to everyone as www.example.com, by running an internal redirect, so that the URL in the browser always reads www.example.com/somepage not uk.example.com/somepage.
Can anyone tell me the best way to go about this? Is there a drupal module or is it best to do this with .htaccess - if .htaccess can someone help with the required code please?
Upvotes: 2
Views: 419
Reputation: 181
Inside the if statement "" of your .htaccess just put this
# if domain is not www.example.com redirect to it
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule ^(.*)$ http://www.example.com.com/$1 [R=301,L]
Upvotes: 1