如何设置WordPress实现文件防盗链
用户直接修改apache中的.htaccess文件即可
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your "don't hotlink" image url
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
注:替换mysite为自己的网址和/images/notlink.jpg为自己定制的防盗链声明图片。