简体   繁体   English

IIS重写URL模块条件

[英]IIS Rewrite URL module Condition

In my C#/.NET project I'm using the Rewrite URL module. 在我的C#/。NET项目中,我正在使用“重写URL”模块。 There I have a rewrite rule which matches a certain pattern. 那里我有一个符合特定模式的重写规则。 However, in some cases, when there's a word "proxy" in the URL I do not want that request to be rewritten. 但是,在某些情况下,当URL中有单词“ proxy”时,我不希望该请求被重写。 I know that it should be done in the Conditions section of my rule. 我知道应该在规则的“条件”部分中完成此操作。 However I'm not sure what exact pattern should be used there. 但是我不确定在那里应该使用什么确切的模式。

Thanks for any help. 谢谢你的帮助。

Your best bet is to create a new rule that checks for "proxy" in the URL as a condition. 最好的选择是创建一个新规则,作为条件检查URL中的“代理”。 Action is "None", and make sure the "Stop processing of subsequent rules" is checked. 操作为“无”,并确保选中“停止处理后续规则”。 And, make sure this rule is triggered before your rewrite rule. 并且,请确保在重写规则之前触发了此规则。

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

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