Content

By default, if you don’t have an index file in a web accessible folder, when accessed through a browser, its contents will be listed.

In order to secure additionally XonHost shared servers, they were patched to disallow directory listing out of the box.

To prevent the listing of the folder’s contents on your server, you should add the following line to the .htaccess file in the folder (if there is no .htaccess file, you can easily create a new one):

 

Was this article helpful to you?

Obaydullah Likhon

Leave a Reply