/usr/local/apache2/conf/httpd.conf中最后加入下面的代码可以防盗链 RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?rfyy\.net/.*$ [NC] RewriteRule \.(mp3|rar|jpg|txt)$ http://www.rfyy.net/000445.html [R=301,L]