My site is showing a listing of all my files. Anyone who comes to my website can see everything! Help!
The directory index is showing because you have no index.html file. Anytime there is no index.html (or index.php, index.htm, etc.) the server will show the default index that it creates on the fly.
You can also control the automatic creation of indexes by performing the following steps :
Create (or edit your existing) .htaccess file and put it in the topmost directory that you want to control. To enable / disable for your whole site, put it in your www directory.
To disable directory listings, add the line :
To enable them, add the line :
If your site still does not list the directory after enabling and you get the error :
“Forbidden You don’t have permission to access / on this server.”
make sure the read privilege is set for the directory you have the .htaccess file in.