interviews.dotnetthread.com

↑ Grab this Headline Animator

Wednesday, July 2, 2008

How to get original or rewritten URL while using ISAPI URL rewriting

Request.ServerVariables("HTTP_X_REWRITE_URL")
will give the original or rewritten URL.
ex: suppose if www.domain.com/page.aspx?a=anitha
is rewritten as www.domain.com/page/?a=anitha

then if we use Request.ServerVariables("HTTP_X_REWRITE_URL")
we get /page/?a=anitha
But if we Use Request.URL or Request.RawURL we get /page.aspx?a=anitha

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles