开发者

IIS URL Rewrite Module : Rewrite Query String Value using Map

开发者 https://www.devze.com 2023-01-18 20:19 出处:网络
I would like to rewrite a query string value using a map in the IIS Url Rewrite Module. Example Map: one-> eleven

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

精彩评论

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