喜悦国际村 » PHP高级编程 » apache RewriteRule 怎么写 防止下载.swf文件?

页: [1]
娱乐随你2007-11-8 02:59 PM
apache RewriteRule 怎么写 防止下载.swf文件?

apache RewriteRule 怎么写 防止下载.swf文件?

只是不让下载 .swf文件 如果调用还可以
这个规则怎么写?

psdshow2007-11-9 06:24 AM
应该跟防盗链差不多吧
[php]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://domain.com$     [NC]
RewriteRule .*\.(swf)$ http://domain.com [R,NC]
[/php]

[[i] 本帖最后由 psdshow 于 2007-11-9 02:26 PM 编辑 [/i]]

娱乐随你2007-11-9 12:57 PM
谢谢谢谢谢谢谢谢谢谢

wamper2007-11-11 06:51 AM
到IE临时文件目录还会保存的,把限制的部分写到flash里吧


查看完整版本: apache RewriteRule 怎么写 防止下载.swf文件?


Powered by Discuz! Archiver 6.1.0  © 2001-2006 Comsenz Inc.
Processed in 0.044211 second(s), 2 queries