Url Rewrite Rule not working with multiple parameters in ASP.Net

Last Reply 4 months ago By dharmendr

Posted 4 months ago

Dear Sir I Have More than one url With Querystrings And I Want to Url Rewrite For Such A Standared Format Application. 

So I Make Many Rules For Such Url Rewriting Dynamic.

localhost/profile.aspx?inst_id=3052&course_id=&course=true

Courses/3052/Info/True

its Working Good.

<rule name="rule3" stopProcessing="true">
    <match url="Courses/([0-9]+)/([_0-9a-z-]+)/([_0-9a-z-]+)" />
    <action type="Rewrite" url="profile.aspx?inst_id={R:1}&amp;course_id={R:2}&amp;course={R:3}" />
</rule>

But Second Url :

localhost/profile.aspx?inst_id=3052&course_id=&photos=true

Photo/3052/Images/True

this is not working 

<rule name="rule4" stopProcessing="true">
    <match url="Photo/([0-9]+)/([_0-9a-z-]+)/([_0-9a-z-]+)" />
    <action type="Rewrite" url="profile.aspx?inst_id={R:1}&amp;admission={R:2}&amp;admission={R:3}" />
</rule>

please tell me how to do for both

thanks in advanced

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html