快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

apache urlrewrite防盗链功能配置

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]
顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论