注:根据需求修改ads.acesse.com 屏蔽域名
Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)
<IfModule mod_rewrite.c>
RewriteEngine On
#Block domain
RewriteCond %{HTTP_REFERER} ads.acesse.com [NC]
RewriteRule ^(.*)$ -[F]
</IfModule>
windows2003下 规则文件httpd.conf
https://www.9zsm.com/faq/list.asp?unid=612 先按此教程开启rewrite,然后添加以下规则。
#Block domain
RewriteCond %{HTTP_REFERER} ads.acesse.com [NC]
RewriteRule ^(.*)$ -[F]
windows2008下 规则文件web.config (手工创建web.config文件到站点根目录)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="屏蔽ads.acesse.com访问">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_REFERER}" pattern="ads.acesse.com" />
</conditions>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>