How to prevent directory browsing of your website?
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 additional SiteGround 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):
Disabling directory browsing on Apache
1 |
Options -Indexes |
Its helpfull
Thanks a lot.
Enjoy your coding….
It solved my problem. Thanks a lot…