注:根据需求修改www.xxx.com 屏蔽域名。
Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)
<IfModule mod_rewrite.c> RewriteEngine On #Block domain RewriteCond %{HTTP_REFERER} www.xxx.com [NC] RewriteRule ^(.*)$ -[F] </IfModule>
windows2003下,安装加载rewrite.dll组件, 规则文件httpd.conf
#Block domain RewriteCond %{HTTP_REFERER} www.xxx.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="www.xxx.com" />
</conditions>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
» 本文链接地址:https://blog.mydns.vip/722.html
最新评论
麻烦发下检测工具
让我下载
非常好