开发者

Urlrewrite regex based on parameter

I would like to rewrite st开发者_开发知识库rings 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜