AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Contact Us Contact ] |WebDevTips Privacy Privacy |
WebDevTips Pick Of The Day : Beat The Spam Bots |

Print This Page

You are here : Home - Web Development - HTML - Folder Protect

Folder Protect

Some servers are set up to to allow directory lists which means if the server doesn't find one of the default pages in a directory it will list all the files in that directory. If that is the effect you require then leave everything alone.

However, it can be useful for developers who might store "work in progress" and not want anyone to find their work by accident or by being nosey.

Create a page similar to the following

<title>KEEP OUT</title>
<body bgcolor="white">
<b style="color:red;">KEEP OUT!</b>
You are not authorised to view the contents of this folder
<br>Click <a href="">here</a> to go to my homepage

SAVE it as 'index.html' and place it in all you image folders.

Of course this is just a suggestion, the page could be fully designed to match the rest of your site and has the added advantage of not displaying the standard server error page if the server does not allow directory lists.

Click here to try and view the contents of my images folder.


[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]