.htaccess 安全性_先进的.htaccess安全性-阻止不需要的引荐来源

.htaccess 安全性

For some bloggers and web developers, Digg can be a huge boost in traffic and thus a huge bust in ad revenue. Unfortunately, the Digg Effect can kill a website's bandwidth and get the website shut down. Wouldn't it be great if a weary web developer could prevent his site from being shut down by blocking users referred by Digg, at least a while? Using a small bit of .htaccess code and mod_rewrite, the developer can do just that.

对于某些博客作者和Web开发人员而言,Digg可以极大地增加访问量,从而大幅减少广告收入。 不幸的是,Digg效应会杀死网站的带宽并导致网站关闭。 如果疲倦的网络开发人员至少在一段时间内阻止Digg推荐的用户来阻止其网站关闭,那不是很好吗? 使用少量的.htaccess代码和mod_rewrite,开发人员就可以做到这一点。

代码 (The Code)

RewriteEngine on
RewriteCond %{HTTP_REFERER} digg.com [NC]
RewriteRule .* - [F]

Say good-bye to Digg Death with this small, easy-to-place snippet of code!

用这个小巧,易于放置的代码片段告别Digg Death!

翻译自: https://davidwalsh.name/block-referrers

.htaccess 安全性

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值