开发者

IIS URL Rewrite Module : Rewrite Query String Value using Map

I would like to rewrite a query string value using a map in the IIS Url Rewrite Module.

Example Map:

one   -> eleven
two   -> fifty  
three -> ninety

So the following URL:

http://www.mydomain.com/page.aspx?id=one

turns in to:

http://www.mydomain.co开发者_开发知识库m/page.aspx?id=eleven

Note: there may be other query parameters passed in the URL which i do not want removed


why not Url Mapping

<urlMappings enabled="true">
      <add url="~/page.aspx?id=one" mappedUrl="~/page.aspx?id=eleven"/>
</urlMappings>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜