how to get rewritten url after url rewriting

Last Reply on Oct 05, 2013 05:58 AM By Mudassar

Posted on Oct 05, 2013 05:56 AM

I have a page default.aspx inside display folder :

 

i use url-rewriting given below :

 

<rewrite url="~/comment/(.+)" to="~/files/default.aspx?section=$1" />

 

In my code behind i want to get re-writting path but when i m using 

path = Request.Url.ToString();


It is fetching original path  like abc.com/files/default.aspx?section='asr'

 

I want to get

abc.com/comment/asr


You are viewing reply posted by: Mudassar on Oct 05, 2013 05:58 AM.
Posted on Oct 05, 2013 05:58 AM

Change the Rewrite Path as

 

<rewrite url="~/comment/(.+)" to="~/files/default/$1" />