Getting the real requested URL

  • Thread starter Thread starter Nobody
  • Start date Start date
N

Nobody

If I request:

http://www.test.com/

which is implictly:

http://www.test.com/index.aspx

Request.Url contains the index.aspx portion regardless of whether or not the
client requested the index.aspx page or not. I want to distinguish between
the implicit and explicit requested pages. The Request.Headers has the
requested GET page stripped too... How can I get the actual page the client
requested, not what the web server is interpretting?

Thanks
 
I don't think it is possible because IIS handles the request and
modified the url string before passing it to the ASP.NET ISAPI filter.

The only way to get the original url is to create an ISAPI filter (Not
HttpModule), and handle the OnUrlMap event. You can then insert this
original url into the header or querystring, and pass it to your
ASP.NET web application.

Tommy,
 
Another option could be to get the script name rather than the URL....

Patrice

--
 
Back
Top