I am going to write this code (using tomcat and so i don't believe there's a simple .htaccess solution), but figured I'd find out if there's already something that performs this for me personally. I want mydomain.com/* to become rerouted to world wide web.mydomain.com/*. Therefore the simplest factor to complete, whether it is available, would be to point the dns record for mydomain.com to some service which just does a 301 redirect to world wide web.mydomain.com with similar path and parameters.

Such service exist?