Redirect cgi (perl) scripts using Apache 0.8.14

Redirect cgi (perl) scripts using Apache 0.8.14

Post by Rob Hartil » Sun, 08 Oct 1995 04:00:00




  : : : : : :

Quote:>The Apache documentation (patch E25) leads me to believe the CGI
> vars are made available to the redirected script.  What am I doing wrong?

You're assuming that the CGI vars can survive a redirect to another
server, which they can't. What you are refering to is an internal
redirect, where Apache finds that for some reason it needs to chnage
to a different (but still local) URL.

You're config setting only tells Apache to respond with a URL
minus any QUERY_STRING info. When clients receive a redirect
response, they cannot re-attach the QUERY_STRING because they can't
assume the QUERY_STRING info is still relevant... they don't know what
generated the redirect.

You can write a script on the first server which creates the
necessary URL for the second server (including the QUERY_STRING), then
send that location to the client.
This will reduce the load on your main server, but it still requires it
to run a small script.

rob

 
 
 

1. CGI-BIN Perl Script Not Routed Back to Browser using Apache

I recently installed Debian 3.0.  Using Apache, to test a perl script (before
installing MySQL), it appears to find the localhost cgi-bin and execute it,
but the browser doesn't display the output.  Instead, a window pops up with
the following:

        "Open 'http://localhost/cgi-bin/first.pl'?

Under that, three buttons:

        "Save to disk"    "Open"    "Cancel"

When choosing "Open", I selected an editor which appeared with the correct
Perl output.  Obviously, the script was found and executed.

I would expect I've a simple step to follow or correct to get the output
routed to the browser - hopefully in 'httpd.conf'?  Any suggestions?

Thanks,  Rob Giden

2. is a virtual console truly virtual?

3. Apache 1.3.14 / Netware Perl/CGI PROBLEM, Please help!

4. Need help setting DISPLAY

5. Using .cgi/.pl to enable CGI script in Apache

6. ?can LyX run on LinuxPPC?

7. Apache 1.3.0 & mod_perl-1.14 and startup.perl ?

8. repartitioning a filesystem woes

9. exec cgi server-side-includes in apache 0.8.14

10. Apache kills CGI script after redirecting or closing STDOUT

11. Linux/Apache - my cgi-bin script can't write/redirect files in any directory

12. Apache 0.6.5 problems with perl cgi scripts

13. sigsegv by process started via bourne shell by perl cgi script on apache