![]() |
|
Other articles:
|
|
Gateway pages are special pages which you want your visitors to pass through as they use your website. Just like putting up a notice in a shop, you want your visitors to be aware of them before they use your website or buy from you. Why do you need gateway pages?There are many occasions where you want to provide notices to visitors to your site. Examples would be:
I've seen pages like that. What's the problem?Traditionally, these notifications are placed in a number of locations. But each solution has its own problems:
So: you can see that you can't guarantee that visitors will ever see your notices! In fact, frequently they won't even know they're there! How can DeLeach help?Using DeLeach, you can protect any or all of your webpages, such that no visitor will ever see the protected pages unless they have already passed through a gateway page.
So long as visitors only reach your sensitive pages through your gateway page, they'll see the notice, as you intend. But if visitors deep-link to your protected pages, they've bypassed your gateway page and they won't see your notice. DeLeach allows you to create a "protected zone" - a group of pages on your website which are accessible only through your gateway pages. If a visitor tries to enter through a deep-link, the pages in the protected zone won't show up. As an alternative, you can provide a second, deep-link-only gateway page - a "back-door" gateway. When a visitor deep-links to a page in the protected zone, the back-door gateway will be served automatically. The visitor will have to explicitly click a link to access the page he wants. What you need to do:You proceed in two steps: Step 1: Create a "protected zone" which will protect your sensitive files from deep-linking:In this step you'll make sure that your sensitive pages can only be seen when they're used from inside your website.
And that's it! From now on, the pages and other files that you've moved into _self will only be accessible through your gateway page. Users who deep-link to those pages will see a 404 error. Step 2: Provide a back-door gateway page:When DeLeach blocks access to a file because a visitor is deep-linking to it, it can also serve up a replacement file. In this case, we're going to use that facility to create a back-door gateway page. The page will be different depending on whether the files you're protecting are simple .html files, or are scripts. Two examples are presented here - more detailed discussions are presented at the end of the article. Example1: All the protected pages are called something.htmIn this situation, you have a selection of sensitive pages, all recorded in different .htm files.
And that's it! Now, every time a visitor asks for one of your protected pages, the back door gateway page will be shown instead. Example 2: There's one protected page, called protected.aspIn this situation, all your sensitive pages are represented by a single script which delivers content from a database. This is how you'd implement a catalogue.
And that's it! Now, every time a visitor asks for a page from the protected.asp script, the back door gateway page will be shown instead. Back-door pages in more detail:The purpose of a back-door gateway page is to:
It is not enough to refresh or reload the page: doing so will still keep the third-party referer which caused DeLeach to hide the content in the first place. It must be a genuine link from this page (in your website) to itself.Since the back-door page already has the url of the page they asked for, the page needs to provide a link to itself. The most reliable way to do that is with a small amount of scripting. Using SSI or .htm:We've already seen an example of an SSI back-door page. Note that this approach will catch all .htm files which don't appear in the main part of the website - whether or not there's a corresponding protected page in the _self directory. A visitor might arrive here, click the link, and then receive a 404 error. Generally speaking, it would be better to place all the protected files (and the back-door gateway) into a special directory, thus: //you.com/
files...
protected/
asset files...
_self/
files.htm
_def/
#.htm
Of course, you can probably find a more descriptive name for the directory than protected/! Using ASP:Though you can provide a _def\#.asp file to intercept all the scripts you want to protect (just as in the example above), you can also provide a seperate gateway page for each individual script. In fact, you can mix and match: you can provide specific gateway pages for the scripts you want to provide specific notices for, and then protect all the rest using the more general _def\#.asp. All you have to do is place all the gateway pages in the _def directory. Using php:The scripts you'll use when you're using php are almost identical to the scripts you use when you're using other scripting languages: <HTML>
<HEAD>Whatever you want in here</HEAD>
<BODY>
Put your notice in here.
To continue, click
<?php echo "<A href='" . $_SERVER['REQUEST_URI'] . "'>here</A>" ?>
</BODY>
</HTML> |
What you need:Works on all versions of DeLeach You'll need some scripting on your server, such as php or ASP. Even SSI will do! |