Support > General

Index.html file in media and it's subfolders?

(1/1)

kyomar:
Hi all, perhaps a stupid question. I just stumbled over this and I am curious what the index.html file is doing in the media folders. If somebody would be please so kind to lighten me up. Thank you!

michalis1984:
Empty index.html to prevent direct browsing of the media folder.

kyomar:
Thanks a lot for the prompt response michalis1984. I am always learning. Over time I have added a few media/image folders but didn't add the mentioned index.html file. I have done this now. Curious, isn't there an easier more bullet proof way to do that (e.g. htaccess)?

datahell:
In most servers directory browsing is disabled, so there is no problem. If there is no index file and directory browsing has been left to enabled then someone would be able to see all of your files in a folder. Although these files are not secret you dont want this way of browsing to your site. Elxis has some empty index.html files for this reason, not in all folders but on many of them. With htaccess you can completely prevent access to a folder but this is not what we want. I am sure that there will be a complex htaccess rewrite rule that will do the trick but there is an other factor too: htaccess is not available in all sites. So, an index.html file is the simplest and best solution.

Navigation

[0] Message Index

Go to full version