I call the following examples "Subdirectory Blockers" because I have no idea what they are really called. I'm sure that you have seen these many times before.
Some surfers like to take off bits of your url in their browsers address or location window to see if they can get a peek at your homepage directory and subdirectories. Most of the time they do this to see what they can find to steal off of your site. This can be a pain if you have private files in your subdirectories that you want to keep from prying eyes.
There is a very easy way to prevent subdirectory surfing. All you have to do is to put an "index.html" file in each one of your subdirectories. What you put on that page is up to you. However, here are a few ideas that may help you to decide.
Example #1: Use this page as your menu page where you have links to all of your other pages in that subdirectory and a link back to your main "index.html" page and/or your other subdirectories.
Example #2: Place a link on the page back to your main page.
Example #3: Place a meta-refresh in the head tags that will automatically take them back to your main page.
Example #4: Place a Javascript in the head tags that will automatically take them back to your main page.
Example #5: Place a window alert box in the body tag that will scold them a bit before sending them back to your main page.
Tip: To make these alerts go by very fast simply hold down the enter key instead of clicking on the buttons. If you want to be really nasty you can add a "disableenterkey" script. J
Home Page This Page Was Last Updated: