Apache 防盗链办法
728x15 ad here
出自Guoshuang Wiki
我用的是 .htaccess 文件办法
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://gallery.ubuntu4life.com/.*$ [NC]
RewriteRule .*\.jpg$ http://gallery.ubuntu4life.com/nolink.gif
xiaohui 的代码在我这里不起作用
# 防盗链配置
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://xiaohui.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xiaohui.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xiaohui.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xiaohui.com$ [NC]
RewriteRule .*\.(gif|jpg|swf)$ http://www.xiaohui.com/about/nolink.png [R,NC]
可能是前面的 on 大小写?还是最后一句的 R,NC?
