隐藏在父文件夹的所有childfolders上市,但显示childfolder内容文件夹、内容、childfolders、childfolder

2023-09-02 00:57:17 作者:妲己在美终究是妖

在父文件夹中的所有childfolders的隐藏上市,但显示childfolder的内容,或者干脆写类似下面的父文件夹的htaccess的...

Hide listing of all childfolders in parent folder but show childfolder's content, or simply writing something like below in the .htaccess of parent folder...

IndexIgnore * (except childfolders+their content)

目录结构:

parent >

child 1->something.pdf
child 2->anything.pdf
...
...
child n->another-something.pdf

现在给用户的时候,他去的父的,再没有什么应该是可见的,但是当他去到父/子[1到n] / 他应该看到的相应的PDF 的。

now to the user when he goes to parent, then nothing should be visible but when he goes to parent/child [1 to n]/ he should see the corresponding pdf.

(也childfolders是的动态生成的并且是的的数量非常大的!)

(also childfolders are dynamically generated and are very large in number !)

推荐答案

把这个code。在父/的.htaccess

RewriteEngine on

RewriteRule ^$ - [F]
 
精彩推荐
图片推荐