红色为一条伪静态规则中排除特定目录的核心代码
<rule name="redirect" enabled="true" stopProcessing="true">
<match url="(.+).html$" ignoreCase="true" />
<conditions>
<add input="{QUERY_STRING}" pattern="^$" ignoreCase="false" />
<add input="{REQUEST_URI}" pattern="^/(upload|static|images)" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="/index.php?s={R:1}" />
</rule>