This is definitally possible with PHP and Apache on *nix, as I've done it before :-)
BUT I've never been able to get this to work on a Windows machine, whether using Apache or IIS :-(
Another option for you might be to use an .htaccess file to ForceType the file to a PHP file. For instance, the filename would be something like 'myfile' WITHOUT AN EXTENSION. Then put this in your .htaccess file:
<FilesMatch "myfile$">
ForceType application/x-httpd-php
</FilesMatch>
Then, whenever something like 'myfile' is requested, it is forced to be parsed by PHP. Then you should be able to use a query string and get the file like this:
http://myserver.com/myfile/this/is/my/querystring
Heres an example of above stuff, the only actual PHP file here is 'article'.
http://customsportswear.com/article/logobag_trends_for_work_play_and_in_between
http://customsportswear.com/article/more_logobags_trends_and_gift_ideas
In your script try putting this and see what variables you have available:
print_r ($_SERVER);