首页 > 网站 > 建站经验 > 正文

apache urlrewrite防盗链功能配置

2019-11-02 16:33:35
字体:
来源:转载
供稿:网友
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]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表