linux主机配置htaccess禁止目录列表浏览

| | Comments (3)



这是个简单极重要的问题,如果目录下没有index文件,则会此目录下的所有文件都将和windows一样被全部显示出来,这样主机上有什么就非常清楚了。

linux主机下我们通常可以配置htaccess文件来禁止显示目录文件,你可以在你的.htaccess文档中键入以下命令,用以阻止目录列表的显示:Options -Indexes

另外提下index不同类型文件的优先级设置写,这是在同一目录下有多个index文件的情况适用

DirectoryIndex index.php index.html index.htm index.php3

单点日志,睡觉啦,晚安哦,以后要更早休息,赚更多的钱都需要一个好身体。http://spoint.babyshoot.cn

3 Comments

很好,学习了

htaccess用处大大地

学习了,呵呵。博主睡的真晚……

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on May 24, 2011 1:13 AM.

wordpress 文章内分页如何实现 was the previous entry in this blog.

网络推广:jpg跳转 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.