[英]IIS Url Rewrite inbound rules process query string
我在不知道如何将查询字符串传递到自定义网址重写模块时遇到了麻烦。 我已经开发了一个自定义url重写模块,该模块将接收完整的url(路径+查询字符串)并重写一些查询字符串值。
在入站规则中使用查询字符串时,如何将其传递给自定义模块?
规则评估开始
RuleName
ReverseProxyInboundRule1
RequestURL
OpenDocument/opendoc/openDocument.jsp
QueryString
sIDType=CUID&iDocID=AbuyCUsQ8L5CskKTqgOSsyw&encoded=9001306c-317f-4332-b03f-44cca57918c2
PatternSyntax
0
StopProcessing
true
RelativePath
/APP.Web/
PatternSyntax
Regex
模式匹配
Pattern
BOE/(.*)
Input
BOE/OpenDocument/opendoc/openDocument.jsp
Negate
false
Matched
true
因为如果您在上方/下方看到,我的自定义模块不会收到查询字符串,而只会收到路径APP.Web/BOE/OpenDocument/opendoc/openDocument.jsp
网址已更改
OldUrl
/APP.Web/BOE/OpenDocument/opendoc/openDocument.jsp?encoded=9001306c-317f-4332-b03f-44cca57918c2
NewUrl
https://server/BOE/OpenDocument/opendoc/openDocument.jsp
好吧,我自己找到了答案。 您可以在入站或出站规则“操作”部分中引用自定义url重写模块。 我只需要将查询字符串也包括在内,作为我自定义模块的输入,如下所示。 TOKEN是自定义模块,我必须根据自己的要求将其添加到IIS进行处理。
重写网址
http://SERVER/BOE/{TOKEN:{R:1}?{QUERY_STRING}}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.