In a virtual host in apache I would like to redirect all requests to <anything>.mydomain.<anything>
to just mydomain.com
.
However, the below rewrite rule is ignored for some reason. Why?
RewriteCond %{REMOTE_HOST} ^.*mydomain.*
RewriteRule ^(.*)$ http://mydomain.com [R=301,L]