当前位置:主页 > 服务器 > Linux >

apache urlrewrite防盗链功能配置

时间:2021-08-15 09:34:58 | 栏目:Linux | 点击:

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]

您可能感兴趣的文章:

相关文章