Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  DirectAdmin  >  How to Enable/Disable Directory Listing with .htaccess via DirectAdmin?
Top Scroll

How to Enable/Disable Directory Listing with .htaccess via DirectAdmin?

 2 min

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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.