拒绝直接访问服务器中的某些文件

时间:2011-08-09 09:04:48

标签: flash http .htaccess

我的www文件夹中有几个文件,即index.html,index.xml,index.swf和index.js。 index.html将包含xml,swf和js文件,类似于

embedpano({swf:"index.swf", xml:"index.xml", target:"pano"});

我想阻止访问xml文件,即http://mywebsite.com/index.xml会被拒绝访问。由于我使用的是apache web服务器,我做了类似的事情

<FilesMatch "\.(xml)$">
  Deny from all
</FilesMatch>

在该目录中的.htaccess文件中。但是,页面(http://mywebsite.com/index.html)未加载,抱怨xml文件的IO错误。

我可以尝试其他选项吗?

感谢。

0 个答案:

没有答案
相关问题