【发布时间】:2011-06-05 16:12:55
【问题描述】:
我的文件夹结构如下:
home
|
snippets---other----bla
| | |
a--b--c d--e--f g--h--i
| | | | | | | | |
filesfilesfilesfilesfilesfiles
我在大多数文件夹中都有默认文件(index.html),但对于没有默认文件的文件夹,我在 home .htaccess 中使用了“Options -Indexes”来生成 403 错误。在 sn-ps 文件夹中,我使用自定义目录列表。
<IfModule mod_autoindex.c>
Options +Indexes
IndexOptions IgnoreCase VersionSort SuppressHTMLPreamble
ReadmeName ../index_end.html
HeaderName ../index_begin.html
</IfModule>
在 sn-ps 文件夹内的 Options +Indexes 规则。但是,我想防止在文件夹 a、b、c 中列出目录。是否有不需要每个文件夹都有一个 htaccess 文件的解决方案?我只能访问 htaccess
【问题讨论】:
标签: .htaccess directory-listing