[Tutor] webbrowser

D-Man dsh8290@rit.edu
Tue, 17 Jul 2001 19:20:18 -0400


On Tue, Jul 17, 2001 at 04:08:14PM -0700, Michael Emperador wrote:
| I am running on Linux Suse7.2.  I have a form(on my personal site) that
| calls this cgi script.
| Based on input, it will redirect to another page on the server(i.e., a
| personal page).  This is what I'm trying to open in a browser. I'm simply
| trying to get to a another page based on user input.  I would greatly
| appreciate your input and any advice you could share.

Oh, I see.  That's a bit different.  You don't want to run a browser
from the script, you want to return an HTTP redirect to the client
(browser) that submitted the form.

I just did a little skimming of the RFC and found these :
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
It says that you want to return status code 303 ("See Other") to the
client.  If you are running your CGI script such that you must provide
all the headers, then you can do this with a few print statements.  If
you are running it where apache fills in the headers for you then I
don't know how to return the redirect.

-D