.htaccess File Options -Indexes on Subdirectories

112,807

Solution 1

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.

Solution 2

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

Share:
112,807
Mago Maverick
Author by

Mago Maverick

Software dude powered by challenge, complexity, ideas & collaboration.

Updated on July 27, 2020

Comments

  • Mago Maverick
    Mago Maverick almost 4 years

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

    Options -Indexes
    

    What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on root only.