Or equivalently, but more robust:
RewriteEngine On
#
RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.com\.?(:[0-9]+)?$
RewriteCond $1 !^subdir/
RewriteRule ^(.*)$ /subdir/$1 [L]
You will need to be careful, though. Be sure to place any external redirects that you may require for "mysite.com" ("websiteb" in your example) into this same top-level .htaccess file, and place them ahead of this internal domain-to-subdirectory rewrite. You will also have to use RewriteRule directives for those external redirects.
Failing to do this, the result will be to "expose" your internal "/subdir" filepaths to clients (browsers and search engine robots), with resulting user confusion and corruption of the search results for this domain.
Also note that if you are planning to add more domains using this method at some future time, it will be far more efficient to group them all under a common directory to make maintenance much simpler:
RewriteEngine On
#
RewriteCond $1 !^add-ons/
RewriteCond %{HTTP_HOST} ^(www\.)?(mysite\.com)\.?(:[0-9]+)?$
RewriteRule ^(.*)$ /add-ons/%2/$1 [L]
Here, we store each add-on domain's files under /add-ons/<domain-name>/ and we get that <domain-name> part from the HTTP request itself.
Also, you really should add domain canonicalization redirect rules ahead of this code, to prevent "duplicate content" problems and so that it will be unnecessary to allow for both the "www" and "non-www" hostname cases in the hostname-to-subdirectory (and any other) rewrites.
Jim