Bind a subdomain to a file
I'm trying to bind a subdomain to a file on Apache... I've had this in my virtual host for a while and it does the job:
Code:
DocumentRoot c:/path/to/file/file.php/
I've been breaking my head over this problem a couple of days now and the best solution would seem mod_rewrite, but I just can't get a working rewriterule.
The PHP script uses $REQUEST_URI and all requests on that subdomain should be passed on to the script, like:
sub.domain.com/
sub.domain.com/file.htm
sub.domain.com/folder/
sub.domain.com/http://somedifferentsite.com
So sub.domain.com[/whatever] needs to become sub.domain.com/file.php[/whatever]
Can anybody help me out?