squid防盗链:
#定义url的acl
acl acceleratedPics urlpath_regex -i \.(gif|jpg|png|jpeg|bmp)$
#定义域名acl
acl acceleratedDomain referer_regex -i .test.com
#定义非空访问
acl acceleratedNotNull referer_regex .
#允许空referer访问
http_access allow acceleratedPics !acceleratedNotNull
#禁止其它域名访问
http_access deny acceleratedPics !acceleratedDomain
#禁止访问显示的图片
deny_info http://file1.gonline.com/images/logo.jpg acceleratedDomain
阅读(732) | 评论(0) | 转发(0) |