繁体   English   中英

IIS ARR重写URL路径作为查询字符串参数

[英]IIS ARR Rewrite URL Path as Query String Parameter

我想转换,

http:// domain / something / another?param1 = value1

http:// domain /?paramz = something&paramy = another&param1 = value1

在Azure中使用ARR IISLB。

此规则应为您工作:

<rule name="ARR Rewrite" stopProcessing="true">
   <match url="([^/]+)/?([^/]+)?/?" />
    <conditions>
        <add input="{QUERY_STRING}" pattern="param1=" />
    </conditions>
   <action type="Rewrite" url="/?paramz={R:1}&amp;paramy={R:2}" appendQueryString="true" />                   
 </rule>

它正在检查URL是否具有两个段( /something/another ),并且查询字符串在查询字符串中具有参数param1 ,然后根据需要进行重写

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM