Watch this video for a step by step process on How to Enable/Disable Directory Listing with .htaccess via DirectAdmin
To enable or disable the directory listing, you can edit the .htaccess file via DirectAdmin. All you have to do is add a specific directive to imply the configuration.
To Enable Directory Listing with .htaccess
1. Log in to your DirectAdmin account.
2. Create or edit the .htaccess file using the File Manager tool.
Here’s an article that you can refer: How to Create/Edit .htaccess File via DirectAdmin?
3. You will have to enter this directive at the start of the file.
Options +Indexes
4. Once you do that, click SAVE.
The next time you browse for the directory listing, it will display the index.
To Disable Directory Listing with .htaccess
1. Create or edit the .htaccess file using the File Manager tool.
2. You will have to enter this directive at the start of the file.
Options -Indexes
3. Once you do that, click SAVE.
The next time you browse for the directory listing, it will display the 403 HTTP Forbidden Access error.
That is how you can configure the .htaccess file via DirectAdmin to enable/disable directory listing.