[REBOL] Re: Download a whole website
From: gscottjones:mchsi at: 3-Aug-2002 16:50
Hi, Oldes,
From: "RebOldes"
<snip>
> There are two things that want to discuss:
>
> 1.
> How to save page from url: http://localhost/
> :(may be index.html default.html or what is
> specified on the server side:(
Unfortunately, I do not believe that http protocol gives a way of knowing
the target in this case. It is the server software that fills in a default
name, such as "index.html" or default.htm" if only given a directory path,
such as http://localhost/ . Warning, I am not an expert on this topic, but
as a confirmation I have experimented to verify that browser clients
(including REBOL) do not receive this information automatically in the
protocol header. I believe that an exception to this will be if the
reference is *forwarded* to a fully qualified target (like hotmail). In
this case, then embedded in the http scheme is a local variable named target
that contains the path and file. With a hacked version of the http scheme,
this information can be used, if needed.
> 2.
> Way how to encode file names of dynamic documents as:
> http://127.0.0.1:85/cgi-bin/getboard.r?boardID=default&lang=cz
I am unsure what you are asking. Do you mean how to create a static file
name for what is a dynamically created web page? I would be tempted to take
a shortcut, unless I really needed to preserve the embeded data in the url.
Something like:
my-url: http://127.0.0.1:85/cgi-bin/getboard.r?boardID=default&lang=cz
split-url: split-path my-url
new-file-name: to-file join checksum split-url/2 ".html"
;=====yielding %11808560.html
It is just a thought.
Hope I've helped.
--Scott Jones