返回列表 发帖

.htaccess图片防盗链方法

空间支持.htaccess的话可以用下面简单方法防止别人盗链你的图

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !uueast.com [NC]
RewriteCond %{HTTP_REFERER} !ikuaizi.com [NC]
RewriteCond %{HTTP_REFERER} !zhuaxia.com [NC]
RewriteCond %{HTTP_REFERER} !xianguo.com [NC]
RewriteCond %{HTTP_REFERER} !google.com [NC]
RewriteCond %{HTTP_REFERER} !bloglines.com [NC]
RewriteCond %{HTTP_REFERER} !feedburner.com [NC]
RewriteCond %{HTTP_REFERER} !feedsky.com [NC]
RewriteRule .*\.(gif|jpg)$ *******/ [R,NC,L]  //*******你的网址

返回列表