2 ways to disable directory browsing on your serverBy Thomas Fjordside
You should always disable directory browsing on your server to prevent other people to look around in your file structure. But some servers don’t come with this setting as standard. So I’m going to give you two ways of doing it.
The first is in a .htaccess file. This is not the solution I would recommend. But you might find yourself in a situation where you don’t have any other choices, because you don’t have deeper access. In your htaccess file you just type in:
This will make sure that directory listing is not allowed in that directory.
The second and better solution in my opinion is via the http.conf file on your webserver.
What you do is that you open the http.conf file and find the line that look like this:
Options All Indexes FollowSymLinks MultiViews
From that line you delete the word Indexes so it looks like this:
Options All FollowSymLinks MultiViews
Then you just have to restart your webserver and it should be working.
Good luck. Hope it saves a bit of trouble.Tweet