Log in

View Full Version : index.html page



gurmeet
04-09-2011, 05:38 PM
hi freinds.

i had downloaded a small project... its based on gallery...


i noticed that ther is index.html in every folder, either ther are images only in that folder... and that file is empty too... means no contents in index.html file...


can any1 tell me what is the purpose of this file?

jscheuer1
04-09-2011, 05:46 PM
Because the index page is the default page in any folder, this guarantees that, should a user attempt to view the folder contents by navigating to the folder instead of a file within it - to the server's directory listing for that folder, all they will get is a blank page.

Now some servers prohibit that anyway, but the designers of this project had no way of knowing. And they just assumed (probably rightly so) that you and they wouldn't want folks poking around in those folders.

djr33
04-09-2011, 05:55 PM
If there is no default page, some servers display a 403 ('forbidden') error message; others display a list of all the files in that directory. And the second case can be bad for security (or at least bad if you don't want to list all the files), as John said.