禁止apache目录下的文件列表

| |
[不指定 2008/07/28 08:55 | by sunle ]
apache中,如果一个目录没有index.html,默认会帮你生成一个, 列出目录下所有的文件。如果你不想要这个功能,可以参考这篇文章: How to disable directory browsing using .htaccess - Apache Web Server。

俺的网站扔在虚拟主机上,改不了apache自己的主配置文件。这样,最简单的办法就是在要禁止文件列表的目录下建立.htaccess文件,然后在里面加入一行:

Options All -Indexes就可以了。
Tags:

网站制作 | 评论(0) | 引用(0) | 阅读(369)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]