There are no htaccess files by default since theres's no app installed in the Stack, you need to create them. By the way, we recommend you to use a file htacces.con file collecting all the Apache Control Access configuration instead of using *.htaccess files. See the link below fore more information:
Regarding using a PHP Variable to handle the subdomain I recommend you to ask on PHP specialised forums. You can also check the WordPress PHP code. It's open source and they use them in the MultiSite solution.
Was my answer helpful? Click on