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]
相关文章
CentOS7开启MySQL8主从备份、每日定时全量备份(推荐)
这篇文章主要介绍了CentOS7开启MySQL8主从备份、每日定时全量备份,解决了链接mysql数据库很慢的问题,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下2019-11-11
最新评论