apache urlrewrite防盗链功能配置
配置虚拟主机时,在配置文件中加入如下内容
- DocumentRoot /home/img ServerName img.host ErrorDocument 404 / RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://img.host/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://host/.*$ [NC] RewriteRule \.(gif|jpg|jpeg)$ http://img.host/forbidden.png [R,L]
免责声明:本文内容来自用户上传并发布,站点仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。请核实广告和内容真实性,谨慎使用。