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.
The form shown above can be modified to automatically redirect when a user has
addition is show below.
<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>
Change the line:
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
Once you have completed the installation successfully, you will have a working
redirect form like the one shown below (go ahead and test it).
- 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.
- Untar the redirect CGI source code
or SSH to your Virtual Server.
- Change your current directory to your home directory
(type "cd" and hit return)
- type "tar
This will install the redirect.pl file into your "www/cgi-bin/Scriptorium/redirect"
- 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.
Example of Redirect (no auto submit)
Example of Redirect (no auto submit, submit image)
Example of Redirect (auto submit)