IIS:正则表达式包括点/周期

时间:2016-07-25 13:51:04

标签: regex iis iis-7.5

我有以下规则。第二个工作,但第一个似乎没有开火。例如,第一条规则的相关网址为index.cfm?section=artists.az&id=22707,第二条规则适用的网址为index.cfm?section=artists&id=22707

<rule name="Artists: AZ" stopProcessing="true">
    <match url="^index\.cfm$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
        <add input="{QUERY_STRING}" pattern="^section=artists\.az&amp;id=([^=&amp;]+)$" />
    </conditions>
    <action type="Rewrite" url="artist.php?id={C:1}" appendQueryString="false" />
</rule>

<rule name="Artists: index.cfm" stopProcessing="true">
    <match url="^index\.cfm$" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
        <add input="{QUERY_STRING}" pattern="^section=artists&amp;id=([^=&amp;]+)$" />
    </conditions>
    <action type="Rewrite" url="artist.php?id={C:1}" appendQueryString="false" />
</rule>

任何想法?

0 个答案:

没有答案