I am writing a class that inherits from IHttpHandler for script and css combining. I only want to combine if the querystring has a special parameter defined. If this parameter is not defined then I want to write the contents of the file as if the handler wasn't even involved. The one problem I'm encountering is that I have a script tag on a page that refers to a script in a virtual directory but the page I am hitting is in a subdirectory of the application.
The page that the control script is being referenced from is located at http://webserver/Admin/Default.aspx. When I access the Request object in the class that implements IHttpHandler all file path properties are the following: webserver/Admin/~/SharedScripts/control.js. How do I resolve this?