隐藏父文件夹中所有子文件夹的列表,但显示子文件夹的内容,或者只需在父文件夹的.htaccess中写一些类似的内容。。。
IndexIgnore * (except childfolders+their content)
目录结构:
parent >
child 1->something.pdf
child 2->anything.pdf
...
...
child n->another-something.pdf
现在,对于用户来说,当他转到父级时,应该什么都看不见,但当他转到parent/child [1 to n]/
时,他应该看到对应的pdf。
(子文件夹也是动态生成的,并且的数量非常大!)
将此代码放入parent/.htaccess
:
RewriteEngine on
RewriteRule ^$ - [F]