若有多个目录,请复制<rule name="Block a" stopProcessing="true"> </rule> 代码块,并改为自己的信息即可
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Block a" stopProcessing="true">
<match url="^a/(.*).php$" />
<conditions logicalGrouping="MatchAny">
<add input="{USER_AGENT}" pattern="a" />
<add input="{REMOTE_ADDR}" pattern="" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="Block data" stopProcessing="true">
<match url="^data/(.*).php$" />
<conditions logicalGrouping="MatchAny">
<add input="{USER_AGENT}" pattern="data" />
<add input="{REMOTE_ADDR}" pattern="" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="Block skin" stopProcessing="true">
<match url="^skin/(.*).php$" />
<conditions logicalGrouping="MatchAny">
<add input="{USER_AGENT}" pattern="skin" />
<add input="{REMOTE_ADDR}" pattern="" />
</conditions>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
文章评论 本文章有个评论