Enable or disable directory listing/browsing on Apache with htaccess

To allow directory browsing, add the following line in your .htaccess file

Options +Indexes

Alternatively, you may choose to disallow directory listing on your Apache webserver. To do so, add this:

Options -Indexes

Note that your .htaccess file may not exist yet, or it can be hidden.

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

2 thoughts on “Enable or disable directory listing/browsing on Apache with htaccess

    1. Hi 123456
      .htaccess is a hidden file in your Linux directory. Depending on the file browser you use, it may be hidden from your view.
      In any case, you can create the .htaccess file yourself and add the contents to it as shown in my blogpost.

Leave a Reply

Your email address will not be published. Required fields are marked *