iis url重写重定向是命中和错过

时间:2018-06-14 19:35:11

标签: iis url-redirection

我遇到了一些IIS重定向问题。鉴于以下2个重定向规则,news20有效,但news13不起作用。除了ID之外,它们几乎完全相同。我删除了除了这两个以外的所有其他重定向进行测试,并获得相同的结果。我添加了news13的跟踪;但我无法获得news20的踪迹,因为它成功了,所以我不确定如何比较这两者。根据跟踪中的Input,我怀疑查询不会被请求评估,但它必须适用于news20,所以这没有意义。任何帮助表示赞赏。

<rule name="news13" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*/news/index.cfm?NewsID=13" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="Redirect" url="https://www.mywebsite.com/news13" />
</rule>

<rule name="news20" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*/news/index.cfm?NewsID=20" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="Redirect" url="https://www.mywebsite.com/news20" />
</rule>

微量

14.  RULE_EVALUATION_START RuleName="news13", RequestURL="news/index.cfm", QueryString="NewsID=13", PatternSyntax="Wildcard", StopProcessing="true", RelativePath="/"
 19:26:22.629 
15.  PATTERN_MATCH Pattern="*/news/index.cfm?NewsID=13", Input="news/index.cfm", Negate="false", Matched="false"
 19:26:22.629 
16.  RULE_EVALUATION_END RuleName="news13", RequestURL="news/index.cfm", QueryString="?NewsID=13", StopProcessing="true", Succeeded="false"
 19:26:22.629 

0 个答案:

没有答案