If you don’t want anyone to see what files you have within a directory when no ‘index’ file exists then you can turn off directory listings.
To turn off directory listings, simply create a file called .htaccess containing the line of code listed below and place it within the directory you want them to be disabled for:
Options -Indexes
Using the following line of code within a .htaccess file allows for directory listings to be enabled.
Options +Indexes
They are however enabled by default on our servers.