.htaccess File Options -Indexes on Subdirectories

前端 未结 2 538
北荒
北荒 2020-12-09 15:02

I have the following .htaccess line, simple no indexes on root.

Options -Indexes

What do we add so it propagates to any sub directory inste

相关标签:
2条回答
  • 2020-12-09 15:47

    htaccess files affect the directory they are placed in and all sub-directories, that is an htaccess file located in your root directory (yoursite.com) would affect yoursite.com/content, yoursite.com/content/contents, etc.

    http://www.javascriptkit.com/howto/htaccess.shtml

    0 讨论(0)
  • 2020-12-09 15:51

    The correct answer is

    Options -Indexes
    

    You must have been thinking of

    AllowOverride All
    

    https://httpd.apache.org/docs/2.2/howto/htaccess.html

    .htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

    0 讨论(0)
提交回复
热议问题