[英]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}&paramy={R:2}" appendQueryString="true" />
</rule>
它正在检查URL是否具有两个段( /something/another
),并且查询字符串在查询字符串中具有参数param1
,然后根据需要进行重写
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.