How can I configure Apache to automatically map a sub-domain to a directory?
Posted on Jul 01, 2008 under domain news and reports | 2 CommentsEssentially I want to be able to browse to http://mysub.example.com to remap to http://example.com/mysub/ but have it work for any subdomain off of example.com.

July 1st, 2008 at 9:29 am
You should look into using the mod_rewrite module to rewrite your URLs. You can use a regulare expression match to get the subdomain name and then translate this into the desired location so that something like http://test1.example.com becomes http://www.example.com/test1.
Regular expressions are kind of tricky so I would just Google for a solution to this – I bet it's been done many times before.
November 11th, 2011 at 10:50 pm
artificial christmas tree…
That is really interesting, You are an excessively professional blogger. I’ve joined your feed and look forward to looking for extra of your excellent post. …