apache 防盗链三例
来源:互联网 发布:砒霜淘宝上叫什么 编辑:程序博客网 时间:2024/05/21 10:21
apache 防盗链三例
apache 防盗链两例
1.利用rewrite 确认你的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>
本页网址: http://sohotx.com/mzk/index.php/1007/ArticleContent/388.html
- apache 防盗链三例
- Apache 防盗链方法
- apache 防盗链两例
- apache 防盗链两例
- Apache防盗链说明
- apache 防盗链
- apache防盗链原理
- apache mod_perl 防盗链
- apache 防盗连
- Apache 防盗链
- Apache 防盗链
- apache防盗链
- apache+mod_perl防盗链
- apache,防盗链,简单
- apache+mod_perl防盗链
- Apache 防盗链
- 浅谈apache防盗链
- apache配置防盗链
- PHP5自动加载
- 统计分析apache服务器日志
- 每个.Net开发人员应该下载的十种必备工具
- 1.Ajax与Atlas开发基础
- 每天学习flash一点(3) flash外部读取xml
- apache 防盗链三例
- 反病毒引擎设计全解(二)
- 从今天开始研究生生活!
- JSP数据库操作例程 - 数据分页显示
- FakeRaid
- 实现小数据量和海量数据的通用分页显示存储过程
- 线程(thread)技术
- 深夜,想起了我的小宝宝了
- 软件工程相关应用记录