[英]IIS ARR Rewrite URL Path as Query String Parameter
I want to convert, 我想转换,
http://domain/something/another?param1=value1 http:// domain / something / another?param1 = value1
to 至
http://domain/?paramz=something¶my=another¶m1=value1 http:// domain /?paramz = something&paramy = another&param1 = value1
with ARR IIS LB in Azure. 在Azure中使用ARR IISLB。
This rule should work for you: 此规则应为您工作:
<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>
It is checking if URL have two segments ( /something/another
) and query string has parameter param1
in query string then it's rewriting as you want 它正在检查URL是否具有两个段(
/something/another
),并且查询字符串在查询字符串中具有参数param1
,然后根据需要进行重写
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.