To allow directory browsing, add the following line in your .htaccess file
Alternatively, you may choose to disallow directory listing on your Apache webserver. To do so, add this:
Note that your .htaccess file may not exist yet, or it can be hidden.
2 thoughts on “Enable or disable directory listing/browsing on Apache with htaccess”
Wow and what if i don’t have a .htaccess file ?
.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.