CentOS下Apache 防盗链配置
首先在httpd.conf文件中把如下的配置放开,默认是注释掉的 LoadModule rewrite_module modules/mod_rewrite.so 下面是域名 ServerName http://www.xxxx.com 防盗链配置 RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.xxxx.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.xxxx.com$ [NC] RewriteRule .*\.(gif|png|jpg|swf)$ http://www.xxxx.com/images/error.png [R,NC] RewriteRule .*\.(gif|png|jpg|swf)$ /ALLOW/img/error.jpg [R,NC] RewriteEngine on:开启Rewrite RewriteCond %{HTTP_REFERER} !^http://www.xxxx.com$[NC]:如果网站不是从h...