In which way you can retrieve original request URL when using URL rewriting or Server.Transfer in ASP.NET?

 Posted by Tripati_tutu on 11/17/2010 | Category: ASP.NET Interview questions | Views: 2963 | Points: 40

The way to retrieve original request URL is Request.ServerVariables("HTTP_X_REWRITE_URL") . It will work on all types of URL rewriting methods like ISAPI filters, HTTP Handlers or Http Modules and on Server.Transfer. Before any URI modifications, the original Request URI is saved into the HTTP header i.e. X-Rewrite-URL. This can also be retrieved in ASP.NET by using the above method.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response