欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

apache rewrite防盜鏈三例

 更新時間:2007年07月10日 00:00:00   作者:  
1.利用rewrite 確認(rèn)你的apache 能使用rewrite mod
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://linuxsky.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://linuxsky.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.linuxsky.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.linuxsky.net$ [NC]
RewriteRule .*\.(gif|jpb|png|css|js|swf])$ http://www.linuxsky.net [R,NC]
其中有色的地方都是要改為你的:
 
紅色:就是改為你提供下載頁面的地址,也就是只有通過這個地址才可以下載你所提供的東東。
 
藍色:就是要保護文件的擴展名(以|分開),也就是說以這些為擴展名的文件只有通過紅色的地址才可以訪問。
 
綠色:如果不是通過紅色的地址訪問藍色這些為擴展名的文件時就回重定向到綠色地址上。
2.利用SetEnvIfNoCase 和 access
SetEnvIfNoCase Referer "^http://linuxsky.net" local_ref=1
SetEnvIfNoCase Referer "^http://www.linuxsky.net" local_ref=1

Order Allow,Deny
Allow from env=local_ref
紅色為信任站點,藍色為受保護的文件擴展名。 


3.<VirtualHost *:80>
ServerAdmin webmaster@etoow.com
DocumentRoot D:/www/www.etoow.com
ServerName www.etoow.com
ServerAlias etoow.com
ServerAlias www.chinahtml.net
ServerAlias chinahtml.net
ServerAlias www.chinahtml.cn
ServerAlias chinahtml.cn
ErrorDocument 404 http://www.etoow.com/error.html
SetEnvIfNoCase Referer "^http://www.etoow.com" local_ref=1
SetEnvIfNoCase Referer "^http://etoow.com" local_ref=1
<FilesMatch "\.(gif|jpb|png|css|js|swf)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>
</VirtualHost>

相關(guān)文章

最新評論