Retrieve a URL in that has been rewritten by using url rewriting tool

Needless to say its simple and easy to retrieve a url before its been rewritten  using Request object .This short article explains  how to retrieve a url  after it has been rewritten using  url rewriting technique(isapi  in my paticular case ).


Out of the many server variables available to our disposal the Request.ServerVariables("HTTP_X_REWRITE_URL") gives you the rewritten url.

A sample code line would be as follows in

Dim myUrl As String = Request.ServerVariables("HTTP_X_REWRITE_URL")

That should be all you need to do .Hope that helps

Happy Coding


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s