HOW TO RE-DIRECT ONE WEB PAGE

AUTOMATICALLY TO ANOTHER


THE PROBLEM

Sometimes it is advantageous to automatically redirect a web user from one URL to another. Also, if we are transferring a web site to a CD-ROM, it is best to locate a proxy html page at the root level of the CD which, when opened in a browser, automatically redirects to the actual web site as contained inside another folder or directory on the CD. This avoids the nasty clutter of having html pages splattered around in the root directory, leaving the end user to wonder what page is the startup html page.


THE SOLUTION

The re-direct command is a metatag added to the header of an html page. Here is an example with the important tag in large letters and bolded:

<HTML>
<HEAD>
<TITLE>My Web Page</TITLE>
<META HTTP-EQUIV="Refresh" CONTENT="5;URL=http://www.utah.edu">
</HEAD>

 

There are two pieces of information you need to customize for your re-direct situation. Both are between the quote marks for CONTENT.

"5;URL=http://www.utah.edu"

The first number is the number of seconds that will be counted before the re-direct actually takes effect. This time delay allows the user to read whatever you have on the re-direct page. If you do not want any time to elapse before the re-direct takes effect, then enter 0.

The second piece of information is the URL of the new page that the user is re-directed to. Use the appropriate directory structure so the URL can be found. If the re-direct is pointing to an html page in the same directory as the original page, then the URL might say URL=mynewpage.html. Otherwise, you may need to add a "../ " in order for the re-direct page to be found in another directory on the same site. Or if you are using a proxy html page on a CD-ROM, this page might re-direct the user to a subfolder containing the real web content. In this case, the URL=/websitefolder/index.html.