Oct 09

apche 防止圖片盜鏈

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

######## Preventing Image ‘Theft’ ########

SetEnvIfNoCase Referer “^http://(.)+\.vincent\.idv\.hk/” local_ref=1
SetEnvIfNoCase Referer “-” local_ref=1
######## Allow the LOGO image Theft ##########
SetEnvIf Request_URI “/images/logo(.)+” local_ref=0

<FilesMatch “\.(png|gif|jpg)”>
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

參考文檔:

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


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書