问题描述:

I would like to rewrite strings of this form:

"/folder/default.aspx?a=1&b=2&c=3" (example)

to

"/newfolder/?a=1&b=2&c=3"

if url contains "a=1"

Im using UrlRewritingNet

网友答案:

Try this:

<rewrites>
    <add name="SomeRuleNameHere" 
         virtualUrl="^~/folder/default\.aspx\?(.*&amp;)?a=1(&amp;.*)?$"
         destinationUrl="~/newfolder/?$1a=1$2"
         ignoreCase="true"
         rewriteUrlParameter="ExcludeFromClientQueryString" />
</rewrites>
相关阅读:
Top