Hi. I'm no Apache expert and I'd appreciate your help with the following.
I have an Apache server that has 2 vhosts (dev.example.com and www.example.com). I have plenty of national commercial domain names registered (like example.co.uk, example.eu etc.).
There was a request to redirect all those domains to www.example.com (including the domain names with and without www prefix). I've achieved that using ServerAlias directive in the www.example.com vhost.
Now there's also a requirement to not only redirect, but also rewrite all those URLs to www.example.com.
Can anyone help me with what the rewrite module configuration should look like?
I've found this post at serverfault (http://stackoverflow.com/questions/5966827/redirecting-multiple-domains-urls-to-one-canonical-domain), but when I try that, all those domains then lead to the dev.example.com site (I can tell, because that site requires authentication). I need to leave the dev.example.com intact and accessible separately (without any redirection/rewrite).
Thanks in advance