I'm developing a website where I have an administrative panel that is accessed only by those who have access. in the pages of the administrative panel, I made the validation that verifies that the user is logged in as admin to access the page. For example, if any other user attempts to access directly through the URLsname.com/administrative/users, they will be redirected to the homepage. However, if I just type in the address bar: nomedosite.com/administrativo, it brings me a listing of all the files I have in the folder. How to prohibit this, so that when accessing the folder that has the files the user is redirected, and not only when accessing the page?