I would like my subdomain to suggest straight to a folder. That's if the HTTP request is built to apple.example.com, I would like the reaction to function as the items in example.com/apple/index.html, although not a 301 error. Is it feasible?

Yes, this really is the objective of tools like ISAPI_REWRITE. My webhost (orcsweb) uses exactly this method.


Yes, but you have to make certain that the server has the capacity to support virtual domain names. I'm not sure enough relating to this, however the mod_rewrite can be done without redirects.

# Internally rewrite <subdomain>.example.com/<URLpath> to example.com/subs/<subdomain/<URLpath>
RewriteCond $1 !^subs/
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule (.*) /subs/%1/$1 [L]

You are able to serve content from the folder or send a redirect towards the client, but AFAIK you can't do both simultaneously - you can't serve content and in some way alter the url in browser simultaneously.

If it might be possible, it might most certainly result in many security exploits.