Home > DeveloperSection > Forums > how to use regex
john rob

Total Post:108

Posted on    September-02-2014 11:57 PM

 ASP.Net ASP.Net 

 1 Reply(s)
 1038  View(s)
Rate this:

I am using UrlRewriter.NET for urlrewriting...how do i write the regular expression for


in this format <rewrite url = "~/ViewProfile/([^/.]+)" to="~/ViewProfile.aspx?uid=$1" />

what should be the rewrite url for http://localhost:2731/CitiZenJourNalism/Reports.aspx?cat=local&id=6

Any help is appretiated.

Sumit Kesarwani

Total Post:378

Posted on    September-03-2014 11:39 PM

Hi John, 

try this:

<rewrite url="~/Reports/(.+)/(.+)" to="~/Reports.aspx?cat=$1&amp;id=$2" />

Don't want to miss updates? Please click the below button!

Follow MindStick