As long as it has the subdomain host in the browser I think it should work. You just have to first login to the root site at the root domain, then go into site settings and create a child site by chossong new site from the dropdown. After the site is created a new tab will appear for Host Name Mapping, add the host name (anysubdomain.mydomain.com in your example) to the child site. Now it should respond using the subdomain. If it still shows the main site try touching the web.config to recycle the app.
See here for documentation.
Hope it helps,
Joe