Forum Moderators: phranque
Thanks,
JNunezNYC
Dynamically configured mass virtual hosting [httpd.apache.org]
I think it's possible with mod_rewrite but the docs are over my head. I remember one of my old ISP's having the user home pages as username.isp.com
Thanks Again,
Welcome to WebmasterWorld!
The code posted in this thread [webmasterworld.com], while intended for use in .htaccess, can be easily modified to help with a piece of your problem -- that of mapping arbitrary subdomains to subfolders, without having to define each new subdomain as it is added.
In conjunction with wildcard DNS and a simple RewriteRule to treat "mydomain.com" and "www.mydomain.com" as exceptions that should not be mapped to /subs, this technique will allow you to do what you want.
It's a fairly complex piece of code, considering its small size, so please review the documents cited in our Apache Forum Charter [webmasterworld.com] so you'll be able to use it with confidence.
Jim