The .htaccess file
What is .htaccess
Hypertext Access, commonly shortened to .htaccess, is a configuration file which controls the directory it is placed in and all the subdirectories underneath it.
It’s an incredibly useful feature which allows webmasters to control how many aspects of their website works.
You can redirect pages, change the extensions of pages, password protect directories and much much more.
Be aware: The .htaccess files work ONLY on Linux servers and NOT ON Windows servers.
If you do not know the kind of server you have visit this link to find out.
Check this out for more.
Stop a Directory Index From Being Shown
Sometimes, for one reason or another, you will have no index file in your directory.
This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown. This could be a security risk for your site.
To prevent against this (without creating lots of new 'index' files, you can enter a command into your .htaccess file to stop the directory list from being shown: