IIS 6

Global.asax Events in IIS 6 and IIS 7 for Static Resources

A quick and easy way of doing URL rewriting or responding to requests for static resources is to use the Application_BeginRequest event. This event will fire each time a page is requested. In there, you could do something like the following to serve a different file when a specific URL is requested to your site:

// get the current URL
string sUrl = Request.Url.PathAndQuery;
if (sUrl == "/my-pretty-url/some-page")
{