On my server, I created a folder in which there is no index.php or index.html.
folder1/test.php folder1/sample.php folder1/hello.php
When I tried to visit this folder, it shows all the files there.
This is my concern, it should not show files in my folder, because it is prone to hacking. It should display the page, for example, Deny 403. I do not want to use index.php to redirect them somewhere.
I heard that this is related to .htaccess, and that is a reasonable thing.
Please teach me how to do this.
source share