我的防盗链测试不管用,请指教,谢谢

我的防盗链测试不管用,请指教,谢谢

httpd.conf中,在<Directory "/usr/local/www">设置块中,加入

QUOTE:
SetEnvIf Referer "http://www.mydomain.com/" local_referal
   SetEnvIf Referer "$" local_referal

   Order Allow,Deny
   Allow from env=local_referal

重启apache后,经过测试,发现在盗链网页中,加入http://www.mydomain.com/1.tar.gz的地址后,客户端还是可以正常下载

请指教下,谢谢

QUOTE:
被盗链主机,apache日志

60.209.218.26 - - [31/Jan/2007:10:57:54 +0800] "GET /1.tar.gz HTTP/1.1" 304 - "http://mypc.com/tmp/index.html" "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.1.1) Gecko/20060601 Firefox/2.0.0.1 (Ubuntu-edgy)"

你试试这个,我测试没有问题

SetEnvIfNoCase Referer "^http://www\.xxxx\.com" local_ref=1
SetEnvIfNoCase Referer "^http://www\.xxxxx\.com" local_ref=1
<FilesMatch "\.(bmp|jpg)">
  Order Allow,Deny
  Allow from env=local_ref
</FilesMatch>
SetEnvIf Referer "^$" local_referal