On my webserver, I have one website located at example.com/site
(in /var/www/site
).
I want it to be accessed through site.example.com
, and I'm aware I need to use mod-rewrite to enable this.
Is there a concise snippet I can use to do this? I need to make it extensible so other sites can be accessed this way as well. Thanks in advance.