apache urlrewrite防盗链功能配置
更新时间:2009年06月01日 01:14:15 作者:
配置虚拟主机时,在配置文件中加入如下内容
DocumentRoot /home/img
ServerName img.host.com
ErrorDocument 404 /
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://img.host.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.host.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://img.host.com/forbidden.png [R,L]
ServerName img.host.com
ErrorDocument 404 /
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://img.host.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.host.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://img.host.com/forbidden.png [R,L]
相关文章
腾讯云ubuntu服务器tomcat访问慢的原因分析及解决方法
在腾讯云上配了个一元的学生云,开始一切正常,直到配置tomcat开始出现各种莫名其妙的问题。最终找到问题的原因。下面小编通过本教程给大家介绍下腾讯云ubuntu服务器tomcat访问慢的原因分析及解决方法,一起看看吧2016-10-10
最新评论