Q:

Contents of parent folder not visible on the website

I was surfing through this website http://example.com/admin1/. If you open admin1 folder, nothing is shown but if you open this http://example.com/admin1/Serial/Person.of.Interest/ then the contents are shown.
How is this happening that contents of the parent folder are not shown but that of sub-folder i.e. Serial/Person.of.Interest are?
Is this some kind of settings/options on web server or anything else?

A:

First, the path of the URL does not need to reflect an actual path in the file system at all. It is just an identifier of a resource and it is up to the web server or web application how this identifier is mapped to a resource. For example with more complex sites you have usually some application logic which extracts parts from the identifier and then dynamically generates the result based on results for database lookups for these parts.
But even if the path in the URL does reflect an actual path on the file system today's web servers have ways to restrict access to some path while still allowing access to other path which are inside the restricted path. See for example Apache - How to deny directory but allow one file in that dirctory or Apache - Deny listing directory but allow access to all subfolders for the details on how to do this. 

