I write programs for people. I write programs that constitute entire sites. These programs/sites
sometimes have thousands of hits per day and thousands of users. This translates into hundreds or
thousands of directories!
What happens if someone calls a URL to a directory where there is no default page? The entire
contents of that directory is displayed!!! Once that happens, who knows what sort of information
a person can obtain ?!?!?!?!?!?
This utility will prevent that. Starting October 1st, 1999, all my new scripts use this utility. I am
slowly going back and adding it to previous scripts. What this utility does is add a default page to
every single directory your script creates! This way, the user is blocked from seeing the contents of
that directory and you didn't have to spend the time creating and uploading hundreds of default pages!
It is very simple to use:
- In your script, you must first 'require' this utility with the following line:
- Next, at any and EVERY point in your script you create a directory you simply
make the very next line a call to the sub. It only requires one parameter and that
is the absolute path to the directory you want protected.
Here are some examples showing how to use it:
DEFAULT PAGE: This utility assumes a default page name of
"index.html". If this is not your servers default page name but rather
it's something like: main.html or index.htm then all you have to do is pass
that page name as a second parameter to the script. i.e.
Full explanation is in the utility documentation.