<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=http://www.pageplus.com/~cka/">
The 2 above specifies the number of seconds to wait before forwarding the viewer to the new url.
This statement is recognized by Netscape and Internet Explorer. It is not recognized by lynx.
#!/usr/local/bin/perl5
# Michael Goshorn October 20, 1996
use CGI;
my($q) = new CGI;
print $q->redirect('http://www.pageplus.com/~cka/');
print $q->end_html;
#!/usr/local/bin/perl5 -wT
# Created by Charles Clarke
# use with http://www.fortnet.org/cgi-bin/redirect.cgi/http://machine/path
#
my($path) = $ENV{'PATH_INFO'};
$path =~ s|/http|http|;
$path =~ s|^//|/|g;
if ($ENV{'REQUEST_METHOD'} ne 'POST')
{
print "Status: 301 Moved Permanently\n",
"Location: $path\n\n";
} else
{
print "Status: 301 Moved Permanently\n",
"Context-Type: text/html\n\n";
print "<HTML><HEAD><TITLE>Page redirected</TITLE></HEAD>\n",
"<BODY>This page has been moved to ",
"<A HREF=\"$path\">$path</A>",
"</BODY></HTML>\n";
}
This is a good example of why URL's should specify a directory rather than a specific html file. In this case, the index.cgi script would have solved the problem in one step rather than three.
References: