正在加载...

lighttpd nginx 防盗链

[ 2009/06/30 18:42 | by selboo ]

Lighttpd:

$HTTP["referer"] !~ "^($|http://.*\.(ri0day\.com|kissbye\.cn))" {      
  $HTTP["url"] =~ "\.(jpg|jpeg|png|gif|rar|zip|mp3|swf|flv|wmv|rm|avi)$" {
    url.redirect = (".*"    => "http://ri0day.blogbus.com/")
  }
}
=============================================================
Nginx:

location ~* \.(gif|jpg|png|swf|rm|avi|wmv)$ {
valid_referers none blocked www.ri0day.com google.com;
if ($invalid_referer) {
rewrite ^/ http://ri0day.com/error.html;
}
}
Tags:
,
发表评论
表情
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]