[REBOL] Re: Download a whole website
From: gscottjones:mchsi at: 3-Aug-2002 16:50
> There are two things that want to discuss:
> 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.
> Way how to encode file names of dynamic documents as:
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.
split-url: split-path my-url
new-file-name: to-file join checksum split-url/2 ".html"
It is just a thought.
Hope I've helped.