Click here to Skip to main content
14,268,557 members
Rate this:
Please Sign up or sign in to vote.
url rewriting in in c# in web.config not working with pagination I have append the below code

What I have tried:

<rule name="SpecificRedirect" stopProcessing="true">
         <match url="^slistproduct/([_0-9a-zA-Z-]+)$" />
         <conditions logicalGrouping="MatchAll">
           <add input="{QUERY_STRING}" pattern="(?:listof)=(\d{2})" />
         <action type="Redirect" url="/slistproduct/{C:1}" appendQueryString="false" redirectType="Permanent" />
       <rule name="RewriteUserFriendlyURL3" stopProcessing="true">
         <match url="^([slistproduct]+)/([_0-9a-zA-Z-]+)$"/>
           <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
           <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
           <add input="{URL}" negate="true" pattern="\.axd$" />
         <action type="Rewrite" url="slistproduct.aspx?listof={R:2}" appendQueryString="true"/>

listof=wrench&listof=wrench is getting add due to above url rewritting

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100