Forum Moderators: phranque
Welcome to WebmasterWorld!
Making a rewrite for <some_subdomain>.example.com/anyfile to example.com/subdomain/anyfile is easy. Doing it for <any_subdomain>.example.com/anyfile is easy only if your server is running FreeBSD or some other Unix-type OS that supports POSIX 1003.2 regular-expressions, or if you place the code in httpd.conf, rather than trying to do this in your Web root .htaccess.
See this thread on how to rewrite arbitrary subdomains to subdirectories [webmasterworld.com] for more info on this method.
If your server does not support POSIX 1003.2 regex and you want to implement this in .htaccess, then you'll have to explicity define the valid subdomains and the subdirectories you map them to.
Jim
[edited by: jdMorgan at 7:29 pm (utc) on Jan. 24, 2005]