Apache防盗链方法:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http:/www.xiechui.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xiechui.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xiechui.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xiechui.com$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|png|bmp|swf|mp3|wav|zip|rar)$ http://www.xiechui.com/404.html [R,NC]
把上面代码中的网址替换成自己的,然后提交至网站的根目录.htaccess文件中添加上述代码即可生效。