- Forums
- Tutorial And Guides
- How To Stop Your Directory Showing All Your Files 'index Of...'
This Page Contains information about How To Stop Your Directory Showing All Your Files 'index Of...' By wallpaperforums.com in category Tutorial And Guides with 1 Replies. [1483], Last Updated: Sat May 18, 2024
wallpaperforums.com
Mon Jan 05, 2009
1 Comments
875 Visits
recently i had to change my web hosting to a diffrent one for my wallpaper site. on the new hosting server, i noticed that when i didnt have an index.html file, it would display all my files within that directory. that was scary because anyone could see all my files.
i read an article but it said i had to make the changes on the apache configuration server. but i dont have acess to the server. so today i found a way to block all my directories from being index and showing all the files in that directory. for example. lets say i have a site like yours, and when you go to:
http://wallpaperama.com/test/
i will show this:
Index of /test
| Name | Last modified | >SizeDescription |
---|
|
---|
| Parent Directory | | - |
|
---|
so what you can do create a .htaccess file with the following:
Options -Indexes
now try to open the directory again and you will see something like this:
then upload to your site and after that, it will stop showing your files. this is a good security if your hosting company doesnt have good security in their apache configuration. i hope i have showed you how to stop directory index on your site. this will prevent people from indexing and seeing all your files. after that you will see a message:
Forbidden
You don't have permission to access /test/ on this server.