in reply to Re^3: cgi redirect
in thread cgi redirect

Hi Keszler,

I am trying to write the stuff in a html file and then trying to redirect to that html page, then also it's not redirecting. Below is he code:

open(F,">$DIR_html") or die "Cannot create $DIR_html: $!"; print F start_html("-title" => "Search in progress","-head" => ["<meta + http-equiv=refresh content=20>"]); print F h1("Search in progress"); print F p("The search is still in progress. Please reload this page." +); print F end_html; close(F); } defined(my $childpid = fork) or die "Cannot fork: $!"; if ($childpid) { print redirect("http://localhost/htmlfilewritten"); }

Any idea why it's not working? In this case it should work, cause whatever the header,start_html I have written to file and not to STDOUT.

Replies are listed 'Best First'.
Re^2: cgi redirect
by gmargo (Hermit) on Nov 26, 2009 at 17:16 UTC

    Can you be a little more specific than "not working"? What is actually happening? (My crystal ball is in the shop.)

      not working means, it's not redirecting at all to the html page. I have pasted the code. what I am trying to do is ... while my cgi script processes I will display this temporary page and when processing gets complete, I will overwrite the temporary page with the main result and it will be displayed.