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

Total Post:108

Points:756
Posted on    September-02-2014 11:57 PM

 ASP.Net ASP.Net 
Ratings:


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

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

http://localhost:2731/CitiZenJourNalism/ViewProfile.aspx?uid=3eb5bf69-1047-4936-9885-8ff41d45646f

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

Points:2694
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