ISAPI_Rewrite图片防盗链不起作用经验总结
广告:
ISAPI_Rewrite图片防盗链不起作用经验总结:
1. ISAPI_Rewrite非full版
2. ISAPI_Rewrite已过期
3. iis没有配好(扩展允许、网站上筛选器要加上dll)
4. httpd.ini里面没有写好正则
httpd.ini示例
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Block external access to the httpd.ini and
httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
RewriteCond Host: (.+)
RewriteCond Referer: (?!http://\1.*).*
RewriteCond Referer: (?!http://
(.*\.1718vip\.com|.*\.scef\.com\.cn|.*\.smtpcb\.com\.cn|.*
\.laserfair\.cn|.*\.laserfair\.com\.cn|.*\.hkgii\.com|.*\.
cha600\.com)).*
# RewriteCond Referer: ^(?!http://
(.*\.1718vip\.com|.*\.scef\.com\.cn|.*\.smtpcb\.com\.cn|.*
\.laserfair\.cn|.*\.laserfair\.com\.cn|.*\.hkgii\.com|.*\.
cha600\.com)).*$
# RewriteCond Referer: ^(?!http://
(.*\.1718vip\.com|.*\.scef\.com\.cn|.*\.smtpcb\.com\.cn|.*
\.laserfair\.cn|.*\.laserfair\.com\.cn|.*\.hkgii\.com|.*\.
cha600\.com).*).*$
RewriteRule .*\.(?:gif|jpg|png|exe|rar|zip|mp3|swf)
/Block.gif [I,O,N]
广告: