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.
To prevent the listing of the folder’s contents on your server, you should add the following line to the .htaccess file
++++
Options -Indexes
++++
The .htaccess file must present in the documnet root of that website.