cknz
cknz

Reputation: 57

Disabling directory browsing with htaccess

Can some please clarify which of the following should be used for disabling directory browsing via htaccess?

Options -Indexes or Options All -Indexes

What is the difference between the two and in what instance should either be used?

Thank you.

Upvotes: 0

Views: 486

Answers (2)

smohn
smohn

Reputation: 411

Create a .htaccess file with the following:

Options -Indexes

Upvotes: 1

Miloš Đakonović
Miloš Đakonović

Reputation: 3871

Enabling directory browsing in Apache can be security issue - especially if used in production.

You can disable directory browsing by specifying Options -Indexes.

Note that it is better to do this in Apache configuration file / vhost files than in .htaccess.

Upvotes: 0

Related Questions