让apache上的图片有防止盗链的功能

发表于:2007-07-04来源:作者:点击数: 标签:
让 apache 上的图片有防止盗链的功能 参考文档: Preventing Image 'Theft' By: Ken Coar Preventing hot linking of images by Java Script Kit SetEnvIfNoCase 和 SetEnvIf 的说明文档 http://httpd. apache .org/docs-2.0/mod/mod_setenvif.html#setenvif
  • apache上的图片有防止盗链的功能

参考文档:

Preventing Image 'Theft' By: Ken Coar
Preventing hot linking of images by JavaScript Kit
SetEnvIfNoCase 和 SetEnvIf 的说明文档
http://httpd.apache.org/docs-2.0/mod/mod_setenvif.html#setenvif

httpd.conf 的修改处

######## Preventing Image 'Theft' ########

SetEnvIfNoCase Referer “^http://(.)+.fjhr.com/” local_ref=1
SetEnvIfNoCase Referer “^http://(.)+.hzmjp.com/” local_ref=1
SetEnvIfNoCase Referer “^http://(.)+.dalouis.com/” local_ref=1
SetEnvIfNoCase Referer “^http://(.)+.necktie.gov.cn/” local_ref=1
SetEnvIfNoCase Referer “^http://(.)+.necktie.net.cn/” local_ref=1
SetEnvIfNoCase Referer “-” local_ref=1
######## Allow the LOGO image Theft ##########
SetEnvIf Request_URI “/images/logo(.)+” local_ref=0


Order Allow,Deny
Allow from env=local_ref

原文转自:http://www.ltesting.net