What is the htaccess Options -Indexes for?

后端 未结 2 1443
温柔的废话
温柔的废话 2021-02-01 02:37

I looked at the explanation in the apache.org site but it didn’t explained in a way I can understand. I found some info here .htaccess File Options -Indexes on Subdirectories bu

2条回答
  •  盖世英雄少女心
    2021-02-01 02:41

    -Indexes supresses the possibilty of directly listing files in a directory where no DirectoryIndex is set.

    Assume a httpd DirectoryIndex set to: DirectoryIndex index.html index.php.

    If you have no file in your RootDirectory according to the DirectoryIndex httpd (in this example index.html and index.php) variable, your directory contents will be listed when +Indexes ist set. Your directory contents will never be displayed when -Indexes is set.

提交回复
热议问题