Okay, I have done a fair amount of searching but still can't find something specific enough to handle my problem.
Right now I have a DNS record that redirects all other subdomains to my server. What I'm asking is what would make example.mydomain.com
return HTTP/1.1 301
and redirect to just mydomain.com
My apologies if this has been covered, I just couldn't find anything specific enough.