I am sending data from A.cgi
to B.cgi
. B.cgi
updates the data in the database and is supposed to redirect back to A.cgi
, at which point A.cgi
should display the updated data. I added the following code to B.cgi
to do the redirect, immediately after the database update:
$url = "http://Travel/cgi-bin/A.cgi/";
print "Location: $url\n\n";
exit();
After successfully updating the database, the page simply prints
Location: http://Travel/cgi-bin/A.cgi/
and stays on B.cgi
, without ever getting redirected to A.cgi
. How can I make the redirect work?