If its in apache as a vhost, you could do simply in the vhost "part" this:
Servername
www.mydomain.com
RedirectMatch /*
http://www.yourdomain.com
Something like this, but if you dont use apache or u cant modify apache you could us a php script
<?php
header("Location: http://www.yourdomain.com")
?>