.htaccess don't allow user to view my folder files that don't have index.php
On my server, I've created a folder that doesn't have index.php or index.html.

    folder1/test.php
    folder1/sample.php
    folder1/hello.php

When I tried to visit that folder, it shows all the files in there.

That is my concern, it should not show the files in my folder because it is prone to hacking.
It should display a page like a 403 Forbidden. I don't want to used an index.php just to redirect them to somewhere. 

I heard that this involves .htaccess and this is a smart thing to do.

Kindly teach me how to do it.

Any help would be greatly appreciated and rewarded! Thanks!
.htaccess don't allow user to view my folder files that don't have index.php
===

On my server, I've created a folder that doesn't have index.php or index.html.

    folder1/test.php
    folder1/sample.php
    folder1/hello.php

When I tried to visit that folder, it shows all the files in there.

That is my concern, it should not show the files in my folder because it is prone to hacking.
It should display a page like a 403 Forbidden. I don't want to used an index.php just to redirect them to somewhere. 

I heard that this involves .htaccess and this is a smart thing to do.

Kindly teach me how to do it.

Any help would be greatly appreciated and rewarded! Thanks!