$! This script demonstrates the use of the CGI_SYMBOLS program for creating $! DCL symbols similar to that produced by the CERN server. We assume the $! cgi_symbols program is in the same directory as this script. Each $! variable in the CGI environment will create a DCL symbol of the same $! name prefixed with "WWW_". $! $! Author: David Jones $! Date: 27-SEP-1994 $! Revised: 23-NOV-1994 $! $ write net_link "" $ mcr 'f$parse("SET_DCL_ENV.EXE;",f$environment("PROCEDURE")) "WWW_" $ ON ERROR THEN EXIT $ put = "write net_link" $ crlf = f$fao("!/") $ put "content-type: text/plain" ! CGI header $ put "status: 200 my own damn status" $ put "extra-header: just testing" $ put "" $ if www_request_method .eqs. "HEAD" then exit $! $ create net_link: This script rewrites a url like http://www.tammies.com/htbin/register/mollys into http://www.tammies.com/bands/mollys. $ set nover $ define sys$output net_link: $! $! WWW_SCRIPT_NAME = "/htbin/register/mollys" $! WWW_SCRIPT_PATH = "/htbin/" $! WWW_SERVER_NAME = "www.Opus1.COM" $! $ url = www_script_name $ show symbol url $! $ script = f$extract(1,16,www_script_name) $ show symbol script $ if (script .nes. "/htbin/register/") $ then $ put "you should never get here with this script" $ exit $ endif $! $ band = f$extract(17,17-f$length(www_script_name)+1,www_script_name) $ show symbol band $ newurl = "http://www.tammies.com/bands/" + band $ show symbol newurl $ put "" $ put "the next thing to do is redirect to this new url" $ deass sys$output $ exit