Hide directory contents from showing when accessing the URL directly
- by SoLoGHoST
On my site, if you browse to http://example.com/images/ the contents of the entire directory are shown like so:
How can I make it so that this doesn't show up when people browse directly to http://example.com/images/?
Can I create an .htaccess file in that directory? Or is there a better way? I really don't want people being able to do this for the entire site (i.e. every directory on that site).
What can I do to prevent this? I figure it's either something that has to be done in Apache or using an global .htaccess file and placing it in the public_html folder perhaps?
EDIT
I diverted this using an index.php file, but I still feel that security is an issue here, how can I fix this permanently?