There was a problem loading the comments.

Enable directory index listings using .htaccess.

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

You can configure the webserver to display file listings for directories that do not have a directory index page.

By default on brixly servers, when visitors go to a URL that requests a directory, such as http://example.net/gallery, the web server looks for the default directory index page. If the directory index page does not exist, the webserver displays a “403 Forbidden” error message. This is because directory index listings are disabled by default for security reasons.

In some cases, however, you may want to enable index listings for a directory. To do this, use a text editor to add the following line to the .htaccess file:

Options +Indexes

This directive enables standard indexing, where the index listing shows only the filenames.

You can enable directory index listings for your entire website, though for security reasons this is not recommended. If you are sure you want to do this, add the Options +Indexes directive to the .htaccess file in the public_html directory.

Disable directory index listings

Directory index listings are disabled by default, so you only need to explicitly disable them if they were previously enabled in an .htaccess file. To do this, use a text editor to modify the Options line in the .htaccess file as follows:

Options -Indexes

Share via
Did you find this article useful?  

Related Articles

© Brixly