#!/usr/bin/perl use strict; my($newURL,$ext,$file,$query); #------------------------------------------------------------------# # # Redirect script for Ringlink # ============================ # # 1. Set these variables: # URL to the directory on the new server with the .pl or .cgi files: $newURL = 'http://www.newdomain.com/cgi-bin/ringlink'; # File extension on the new server (.pl or .cgi): $ext = '.pl'; # 2. Replace the old navigation files (next.pl, prev.pl, list.pl, # etc.) with new files containing this script. # #------------------------------------------------------------------# ($file = $0 =~ /[\/\\]/ ? $0 : $ENV{'SCRIPT_FILENAME'}) =~ s/.*[\/\\](\S+)\.\w+/$1/; $query = $ENV{'QUERY_STRING'} ? "?$ENV{'QUERY_STRING'}" : ''; print "Location: $newURL/$file$ext$query\n\n";