Hi, I am stuck into a small issue. I am just simply trying to redirect to a different page if the batch file runs successfully thru system command. success_Calc.html is stored in cgi-bin folder and htdocs folder of the apache server. I have searched the net and tried the below commands but redirection ceases to work. It just prints the URL on the web browser. Are there any config file setting required for this on Apache server?my $res=system ("test.bat"); if ($res==0){ $cgi-> redirect('http://servername:port/cgi-bin/calc_success.html';} #{print 'Status: 302 Moved', "\r\n", 'Location: http://servername:port/htdocs/calc_success.html', "\r\n\r\n";} #{print "Location: http://servername:port/htdocs/calc_success.html$ENV{'REQUEST_URI'}";} #{ print redirect(-uri=>'http://servername:port/calc_success.html', # -nph=>1, # -status=>301);} I have also tried calc_success.pl which is again a perl file with some HTML tags in it. the URL is accesible with the browser and there are no errors in Apache error log. Any pointers will be appreciated Thanks in Advance!
|