web.config 伪静态排除特顶面目录
    文章作者:恒爱网络 阅读次数:1173 发布时间:2023-11-15

    红色为一条伪静态规则中排除特定目录的核心代码


    <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>