I have a few domain aliases, while I only want one of them to be actually used.
At the moment, I have two domains installed,
To redirect I'd like to use htaccess.
My domains currently work like so:
www.domain.com/index.html – Main domain's home page
www.secondDomain.com/index.html – Displays exactly the same home page as the main domain, but I want it to automatically rename the url to www.domain.com/index.html when it's used.
Thanks!
Best Answer
It is a simple matter of matching
%{HTTP_HOST}
not equal towww.domain.com
and redirecting that to the canonical domain.