May 22 2009
Posted by Webmasters-central.com as Internet Marketing
What is web accessible?
All the files of a folder are listed out in the browser. See the image below.
How to prevent this?
Index file:
By keeping ‘index’ file in that folder. By default the browser looks for ‘index’ file (no matter what it is .htm, .html or .shtml)
Once there is index file means the contents cannot be listed out as in the figure. If you have a folder with out ‘index’ file in it, try typing its URL in the browser. Like ‘http://www.yourdomain.com/privatefolder/’. You will see your files as in the figure provided your folder permissions are 755.
.htaccess:
Another way of stopping this is by keeping a small line of code in your root .htaccess file.
1. If you already have a .htaccess file in your root directory just copy and paste the following line in it and save.
Options All -Indexes
2. If you don’t have one then follow these steps:
* Open notepad on your computer.
* Create a text file called htaccess.txt.
* Copy and paste the above line and save it.
* Upload that htaccess.txt to your root directory in ASCII mode.
* Rename it to .htaccess
RSS feed for comments on this post · TrackBack URI
Leave a reply