Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Specials
Site Map
CGi Library of scripts to help you do business with your Virtual Serve and to have a better web site.



Blue Reef Virtual Servers
Virtual Server Support
Virtual Server Addons
CGI Library for use with a Virtual Server
CGI Library Overview
FormMail
PGP FormMail
Simple Visitor Counter
Count 2.5 Visitor Counter
Guestlist
User Information (Finger)
Password-protect files with User Authentication
URL Redirection
Tool to Check Domain Name Availability
Lookup details for domain records
Domain Record Modification Tools
Excite Search Engine for your site
SWISH-E search engine for your site
JavaScript Library
Java Library
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!


Simple Redirect Script

One simple way to allow visitors to easily jump from one section or your web site to another is by using a "redirect" script. A small form and simple CGI can be designed to facilitate such a task. The redirect form and CGI source are presented in two sections below.

HTML source for the redirect form
The HTML source below represents a simple redirect form. This form can be customized for your Virtual Server by simply changing the URLs and Titles (shown in bold) to the URLs and Titles that correspond to specific documents on your web site.
    <html>
    <head>
    <title>Redirect Form</title>
    </head>
    <body>
    <form method="POST"
    action="/cgi-bin/Scriptorium/redirect/redirect.pl">
    <select name="url">
    <option value="">Select a Destination
    <option value="/index.html"> Home Page
    <option value="/products/"> Products
    <option value="/support/"> Technical Support </select>
    <input type=submit name=submit value="Go!"> </form>
    </body>
    </html>
The form shown above can be modified to automatically redirect when a user has selected an option (assuming the user has a JavaScript capable browser). This is done by adding a little JavaScript to one line in form above. This addition is show below.

Change the line:
    <select name="url">
to:
    <select name="url" onChange="submit(); return true">
If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, see Mosaic for X version 2.0 Fill-Out Form Support.

Installing the redirect CGI
To install the redirect CGI on your Virtual Server you will need to do the following:
  1. Download the redirect form
    You will need to download the redirect form HTML source and store it somewhere in your "usr/local/etc/httpd/htdocs" directory structure. Feel free to customize the form, add graphics, etc. But be sure that the variable name for each input field is not altered.

  2. Untar the redirect CGI source code
    1. Telnet or SSH to your Virtual Server.
    2. Change your current directory to your home directory (type "cd" and hit return)
    3. type "tar -xvf /usr/local/contrib/redirect.tar"
      This will install the redirect.pl file into your "www/cgi-bin/Scriptorium/redirect" directory.

  3. Customize the Appearance of the redirect CGI
    It is common to substitute an image for the submit button. An example of such a substitution is included in the examples shown below.
Once you have completed the installation successfully, you will have a working redirect form like the one shown below (go ahead and test it).

    Example of Redirect (no auto submit)

    Example of Redirect (no auto submit, submit image)

    Example of Redirect (auto submit)
SEE ALSO:

Installing CGI Scripts

CGI Security Issues

CGI Scriptorium

About Perl

Perl Modules

Server Side Includes

Mime Types

About Apache Server

Recommended Perl Books

BOOKS TO HELP YOU:

CGI Programming 101
CGI Programming 101

$24.95

CGI Programming With Perl
CGI Programming With Perl

$26.36

PGP: Pretty Good Privacy
PGP:
Pretty Good Privacy

$27.96


Web Security:
A Step-by-Step Reference Guide

$23.96


Official Guide to Programming With CGI.pm
Official Guide to Programming With CGI.pm

$27.99

Javascript Bible
Javascript Bible,
3rd Edition

$34.99

Core Web Programming
Core Web Programming

$34.39

Apache: Web Server Directives Guidebook Apache:
Web Server Directives Guidebook

$15.95

Amazon.com logo
Search for :
Enter keywords...