首页 > 开发 > Apache > 正文

apache urlrewrite防盗链功能配置

2020-04-16 19:24:37
字体:
来源:转载
供稿:网友
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]

您可能感兴趣的文章:

用ISAPI_Rewrite让IIS也支持如Apache下.htaccess的URL重写给apache2.2加上mod_encoding模块後 php5.2.0 处理url出现bugApache Rewrite url重定向功能的简单配置linux下apache开启url重写的方法(详细说明)Apache Rewrite实现URL的301跳转和域名跳转修改apache配置文件去除thinkphp url中的index.phpApache+Weblogic实现URL转发
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表