I have a site that serves up certain content based on the subdomain. So it is the same set of files, and maybe the header and some info in the site pages changes based on t
If it were me (and I haven't thought to do this before) I would:
so:
/sites/subdomain_a/.htaccess
/sites/subdomain_a/pub
/sites/subdomain_b/.htaccess
/sites/subdomain_b/pub
where
/sites/subdomain_a/pub == /sites/subdomain_b/pub
using
ln -s
or similar. Then use mod_rewrite to redirect (internally) to the right site root. I think mod_rewrite is run before .htaccess is loaded.
This means you are effectively serving the same site files with a different .htaccess depending on the subdomain.
Hope this helps, bit of a hack.
Would be interested to see if something better exists.