Multiple domains pointing to a single site? Want to divert the traffic based on domain name? Then this is the simple two liner to do it without faffing with virtualhosts.
RewriteCond %{HTTP_HOST} ^(www\.)?mywebsite.com$
RewriteRule   ^/$  /mywebsite.html [L]
RewriteCond %{HTTP_HOST} ^(www\.)?myotherwebsite.com$
RewriteRule ^/$ /myotherwebsite.html [L]
Category: Apache
| | Leave a Comment
