CGI engine on Darwin
Sannyasin Sivakatirswami
katir at hindu.org
Sat Aug 31 22:05:01 EDT 2002
On Friday, August 30, 2002, at 08:45 PM,
use-revolution-request at lists.runrev.com wrote:
> put URL "http://www.yahoo.com"
>
> does not work. Can anyone running Rev as faceless CGI try this or
> similar
> commands? I can't get over this hump.
>
> Thanks,
> --
> Tim\\
yes, i am using it on Darwin to develop CGI's and then when they are
runnng fine, move them to my ISP's server... really speeds up dev time.
put URL "http://www.somesite.com"
Won't work the same as in Rev in faceless mode because the library
that processes the URL commands is not present. Assuming your goal is
to have the CGI cause the browser to browser a specific web page that
is not on your hard drive (which is what your example infers), you will
have to issue an apache command
If your goal is to have the CGI "send" a remote web page to your
browser then try
put "Status: 301 Moved Permanently" & cr
put "Location: " & newURL & cr & cr\\
In the above scenariothe CGI is not actually processing any
html/data/file at all, but simply tells the browser to go fetch the
URL that you are sending to it. then the browser does the rest... The
status line could be different... this is just an example from a CGI
that process's 404's and sends a new URL to the browser. \
If you are trying to generate web pages to serve up, that's different.
Then you would need to send a file from the hard drive to the browser
with the proper headers:
put url "file:../forms-templates/redirect_404.html" into buffer ## or
any html file
put "Content-Type: text/html" & cr
put "Content-Length:" && the length of buffer & cr & cr
put buffer
==========
Hinduism Today
Sannyasin Sivakatirswami
More information about the use-livecode
mailing list