General purpose URL redirector


Read this entire document for the description, usage, features, and installation instructions for use of these programs. The source code is available here, but be warned that development is in progress. Please indicate unoffical and official versions (i.e., versions not released by me and versions released by me) by prefixing a `U' or an 'O' before the version number. I'd appreciate it if you could notify me of any modifications you may make so I can incorporate them into the official version. You, the user, are responsible for everything the program does.


The redirectory takes as input a POST request submitted using a fill-out form or a command line argument. The program then redirects the browser to the URL specified either by the command line argument, or to the URL corresponding to a location specified in the POST request. This program can then be integrated with the other stuff I've written, such as cookie handling, for logging and tracking purposes.


The general purpose redirector supports the following commands and features. For the purposes of this example, the CGI scripts are assumed to be named register, and modify. Literal characters (i.e., characters you should type in as is) are indicated in a fixed-width font. Variable characters are in italics. See the source code of the demo pages for real uses of program.

redirector used in POST mode.
redirector in POST mode will redirect the browser to the URL corresponding to a location specified in the POST request.
redirector will redirect the browser to the url specified by the argument.

In order for the POST mode approach to work in conjunction with the <select></select> tag, a list of names (exactly as it appears in front of the <option> mapping to a list of URLs must be given. This mapping is specified in the REDIRECTOR_MAPPING_FILE, must be changed in the redirector.c source file. The mapping file used for the demo is available here. Remember, this format is case sensitive!


There are no bugs. Here is a list of caveats and features you should be aware (beware?) of.

Installation instructions

To install the program, you need a C compiler. Edit the defines in cgi_defines.h (explained in detail there) and the Makefile appropriately, and type in `make' at the prompt; it should install without a fuss (at least on an Unix system).

Ramdom access || Ram Samudrala ||