Force 'www' for multiple domains
Posted: Wed Dec 08, 2010 11:29 am
We have all seen the examples of forcing a 'www'sub-domain, thus preventing search engines from seeing two copies of a web site (non-www and www).
This works great, with one exception. I need to apply this rule using a wildcard or optional suffix so that domains like:
testproducts.com
teststuff.net
testingmaterial.com
Are also included in that query and force 'www' subdomain, is this possible?
Cheers,
Alex
Code: Select all
RewriteCond %{HTTP_HOST} ^test\.com$ [NC]
RewriteRule ^(.*)$ http://www.test.com/$1 [L,R=301]testproducts.com
teststuff.net
testingmaterial.com
Are also included in that query and force 'www' subdomain, is this possible?
Cheers,
Alex