DEV Community

Amit Verma (amitoverflow)
Amit Verma (amitoverflow)

Posted on

Disable directory listing on Apache server

While requesting a web directory , the listing of files and folders is called directory listing and it exposes your directory structure to clients. In this short article I will show you how we can disable directory browsing. To disable the listing of files and folders you can just use the following code in your htaccess


Options -Indexes

Enter fullscreen mode Exit fullscreen mode

This will return a 403 error when your directory is direct accessed.
Read the full tutorial here
https://helponnet.com/2021/07/29/apache-disable-directory-listing/

Top comments (0)