#! /bin/perl # redirect.pl # Version: 1.0 # Date: 18 July 1996 # Author: Ian Graham # # ------------------------------------------------------------ # Program to redirect users to new home pages, and to give them # The URL they should correct. This is used as a server-side # include, and returns a document that redirects the user # to the new location. If refered here from another document, # This program also returns text informing the reader of this # fact, and suggesting that they contact the referring page # maintainers, and ask them to update the reference. # ------------------------------------------------------------ require 'utils.pl'; # STEP ONE: MODIFY THE FOLLOWING TWO LINES: # ============================================ # 1) Original Base URL for the documents: $orig_base_url = "http://www.hprc.utoronto.ca"; # 2) New Base URL for the documents (where they are now located) $new_base_url = "http://www.utoronto.ca/webdocs"; # New Base URL for docs. # STEP TWO: LOCALIZATION MODIFICATIONS # ===================================== # You need to edit the utils.pl file, and change the date to # the correct date at which the documents were moved (line 24) and # to change the mailto URL for the local system webmaster (line 99). # # ------------------------ NO CHANGES BELOW HERE -------------- if( defined ($ENV{"HTTP_REFERER"})) { $referer = $ENV{"HTTP_REFERER"}; } $doc_url = $ENV{"DOCUMENT_URI"}; $orig_url = $orig_base_url.$doc_url; # Original document URL $new_url = $new_base_url.$doc_url; # New document URL &print_top($new_url, $orig_url); # print page header if( defined($referer)) { &print_referer($referer); # referer info, if defined } &print_bot; # print document bottom