redirect -- redirect to a new web page

Overview

redirect is a CGI program at MV that allows your web page consumer to jump to a new web URL based on a form element. For example, you might supply a pull-down menu, where selecting one of the menu items will result in being taken to a new URL.

Usage

To use redirect, create an HTML form that references the redirect cgi-bin, and that passes a form-element named "redirect-url" which passes a value tag with the URL that you want to jump to. For example, to create a pull-down menu that uses the redirect utility, you might have some HTML code like this:

  <form ACTION="/cgi-bin/redirect" method="get">

  <select name="redirect-url">

    <option value="/ipusers/mypage/option1.html">
      Option One
    </option>

    <option value="/ipusers/mypage/option2.html">
      Option Two
    </option>

  </select>

  <input name="Go" type="submit" value=GO">
  </form>

In the above example, when an option is selected the redirect utility will send the client to URL specified in the corresponding value tag.

Security

The redirect utility tries to prevent a third party from redirecting to another third party. To do this, redirect attempts to make sure that either target URL or the referring URL are on the same system that redirect is running on. If neither can be validated, then the redirect operation will fail with an invalid referrer message.

The End

redirect was originally written at MV Communications, Inc. in 1999 and last modified in 2008. Source code is available, as noted in the page that probably got you here.