apache urlrewrite防盜鏈功能配置
更新時間:2009年06月01日 01:14:15 作者:
配置虛擬主機時,在配置文件中加入如下內容
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]
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]
相關文章
DDNS 的工作原理及其在 Linux 上的實現(xiàn)
DDNS (Dynamic DNS) 擴展了 DNS 將客戶端 IP 與其域名進行靜態(tài)映射的功能,它可以將同一域名實時地解析為不同的動態(tài) IP,而不需要額外的人工干預2016-09-09騰訊云ubuntu服務器tomcat訪問慢的原因分析及解決方法
在騰訊云上配了個一元的學生云,開始一切正常,直到配置tomcat開始出現(xiàn)各種莫名其妙的問題。最終找到問題的原因。下面小編通過本教程給大家介紹下騰訊云ubuntu服務器tomcat訪問慢的原因分析及解決方法,一起看看吧2016-10-10