Hi nir,
I just came across the below code on forums and unfortunately I only copied the code with a short sentence for me to remember what it should do, so I'm not sure where and when I got it, but it may help you :
This one uses a wildcard type system for subdomains and from memory I think it worked OK. I dropped it for only using one domain after having read an SEO article that indicated subdomains may dilute the ranking of a main domain.
You see that all dots are escaped so that instead of mysite.com you have mysite\.com, otherwise it will give you an error.
RewriteCond %{HTTP_HOST} !^(www\.)?mysite\.com$ [NC]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^([^\.]+)\.mysite\.com$ [NC]
RewriteRule .* /%1%{REQUEST_URI} [QSA,L]
I think this is what you are talking about i.e. redirecting a subdomain to a folder with the same name and 'should' redirect the subsequent requests while keeping the initial. I'm not sure this will work if you have complicated scripts running in the subdomain folder though... Give it a try and a) hope it works and b) hope it does what you want :)
John
Significant Media