Probably easier to simply setup a htaccess file on the base domain. In the htaccess file create a rewrite rule that any url that uses a 3rd level domain is rewritten to only second level domain. I believe the rewrite rule can specify the redirect to be 302 or 302 (temp or perm. redirect)
Not sure what the SEO implications are tho.
You can find examples of such htaccess file that rewrite
www.example.com to example.com. You just have to modify the rule to a wildcard instead of targeting only 'www'
Cheers