Simple .htaccess file for preventing directory listing on the apache web server.
Disabling Directory Listing on Apache Web Server!
In order to disable directory listing on an Apache web server you have to create a .htaccess file in the related application directory. You can add the following lines to the httpd.conf file or replace the existing lines with the following:
As you can see from the example code above, you should remove the Indexes and MultiViews statements for the directory listing feature will be disabled safely on an Apache web server.
Follow this process to solve directory listing vulnerability!