Adam Ramadhan
Adam Ramadhan

Reputation: 22820

htaccess Options -Indexes ? on root folder not working

Options -Indexes 

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L,QSA]
</IfModule>

<Files ~ "^\.git">
    Order allow,deny
    Deny from all
</Files>

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

hello what im trying to do is disable all of my folder recursively from the root so there is no file listing. how can i do that ? is this the right way ?

Thanks

Adam Ramadhan

Upvotes: 1

Views: 4590

Answers (2)

mylesagray
mylesagray

Reputation: 8879

AllowOverride Options -Indexes

http://www.ducea.com/2006/06/26/apache-tips-tricks-disable-directory-indexes/

Upvotes: 1

Satya
Satya

Reputation: 4478

You can't do Options minus, so how about Options None?

Upvotes: 1

Related Questions