tangent beat me to it but I already wrote it and it covers some CGI stuffage, so here it is.
Probably you have something like this–
use strict; use CGI ":standard"; # Lots of logic that somewhere results in printing a header... print header(); # And THEN you try to redirect.... my $url = "http://Myserver/Travel/cgi-bin/A.cgi/"; print "Location: $url\n\n"; exit;
Which results in–
Content-Type: text/html; charset=ISO-8859-1 Location: http://Myserver/Travel/cgi-bin/A.cgi/
You only get to print headers once. It’s also possible, but unlikely, your server is configured to send headers for you. As hippo mentioned, the redirect is probably better written this way–
print redirect( -location => $uri );In reply to Re: Redirection to one cgi page from another is not working
by Your Mother
in thread Redirection to one cgi page from another is not working
by nadarajan_v
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |