Forum Moderators: phranque
RewriteCond %{HTTP_HOST}!^www\.example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=310,L]
I've had some recent situations where other domain names out of my control have been pointed at my ip. Do I really want to tell the world that www.spammy-web-site.com is actually www.mysite.com?
Should I test for those specific domains that I know belong to me and redirect them and issue 404s to any other domain? I haven't had any problem so far, but with all the hijacking talk going around these days, I'm a bit paranoid.
Your choice would depend on which list is shorter, and whether you plan to add more legitimate domains in the future.
Jim