MatthewV has asked for the wisdom of the Perl Monks concerning the following question:
The redirect code works on the login check script but when I use it here it just prints "Status: 302 Found Location: http://admin.ffinfo.com/" The HTML code I am using is this#!perl -w use strict; use CGI q~:standard~; use DBI; use CGI::Cookie; use CGI::Carp q~fatalsToBrowser~; my(%Cookies, @Values, $Username, $Password, $Error, $DBH, $STH); print "Content-type: text/html\n\n"; %Cookies = fetch CGI::Cookie; if ($Cookies{'FFAdmin0229'}) { @Values = $Cookies{'FFAdmin0229'} -> value; $Username = $Values[0]; $Password = $Values[1]; } else { print redirect(-location => 'http://admin.ffinfo.com/'); }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ +/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--#exec cgi="/ssi/checkcookie.pl"--> <html xmlns="http://www.w3.org/1999/xhtml">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help with redirect
by almut (Canon) on Jun 02, 2009 at 00:36 UTC | |
by MatthewV (Acolyte) on Jun 02, 2009 at 01:16 UTC | |
by almut (Canon) on Jun 02, 2009 at 01:54 UTC | |
by ikegami (Patriarch) on Jun 02, 2009 at 02:03 UTC | |
by MatthewV (Acolyte) on Jun 02, 2009 at 02:04 UTC | |
by almut (Canon) on Jun 02, 2009 at 02:39 UTC | |
by ikegami (Patriarch) on Jun 02, 2009 at 01:41 UTC | |
by MatthewV (Acolyte) on Jun 02, 2009 at 02:10 UTC | |
by Anonymous Monk on Jun 02, 2009 at 01:33 UTC | |
|
Re: Need help with redirect
by scorpio17 (Canon) on Jun 02, 2009 at 12:47 UTC | |
by MatthewV (Acolyte) on Jun 02, 2009 at 18:46 UTC | |
by scorpio17 (Canon) on Jun 02, 2009 at 21:50 UTC | |
by MatthewV (Acolyte) on Jun 02, 2009 at 22:44 UTC |