Rev CGI scripts
Jim Ault
JimAultWins at yahoo.com
Mon Aug 11 23:19:23 EDT 2008
I think this is how I 'see' it.
When the visitor's browser makes a request, it specifies either a ...
script "#!rev -ui & lines of transcipt" saved as "sendPage.txt",
"sendPage.cgi"
or a script that starts using a stack saved as "stackToUseAndSendPage.rev"
or an exe saved as "sendPage.exe"
and in every case the URL in the browser must specify the location of the
file relative to the cgi-bin folder. If no folder is specified, then the
default folder is the cgi-bin folder.
If a path to a script is specified, then it is relative to the cgi-bin
folder. If an html flle is specified, then it is relative to the www
folder, or web root folder.
On launching, the $PATH web server global is populated with multiple paths
that tell the web server where to look for the cgi scripts or exe's before
giving up. I believe it will look in each path until success (then stop
looking of course), so the order is important if you have two scripts with
the same file name in two different paths. You can modify/append the $PATH
global from any script/exe and this will become persistent until the web
server is relaunched, thus any subsequent calls for cgi files in custom
paths would work. Set once, run many.
The absolute path would be required if the file reference was not at the
same domain (same web server), such as a mortgage calculator hosted on
another server or an <IFRAME> html page referencing another server.
If this is incorrect, I trust someone will comment and we can learn.
Jim Ault
Las Vegas
On 8/11/08 7:33 PM, "Sarah Reichelt" <sarah.reichelt at gmail.com> wrote:
> On Tue, Aug 12, 2008 at 12:22 PM, Andre Garzia <andre at andregarzia.com> wrote:
>> Sarah,
>>
>> instead of linking with URLs like
>>
>> <a href="http://192.168.0.123:8888/folder/file.txt">
>>
>> why don't you use root relative paths without the server, like:
>>
>> <a href="/folder/file.txt">
>>
>> if so, the server part will be assumed to be the same one serving the page.
>
> The page with the links is dynamic and never actually written anywhere
> on the server, so I didn't think that would work, but I'll give it a
> try.
>
> Thanks,
> Sarah
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list