I know it may be a duplicate issue, but so far I have not found anything that was consistent.
I need to do a simple redirect:

*.mydomain.com/a to *.mydomain/b

That is, all pages "a" must go to "b" for ALL subdomains (including the main domain).
How is this possible?