Re: default documents

Harry Munir Behrens (behrens@mtl.t.u-tokyo.ac.jp)
Mon, 22 Apr 1996 11:11:29 +0900


In message <19960421185925458.AAA60@defiant.abilnet.com>, Darrin Chandler write
s:
>At 14:44 04/21/96 +0100, you wrote:
>>How does a robot know what the default document
>>(index.html/default.htm/home.html) is called?
>>
>>I mean, how does it know that, say, http://www.mydomain.com/test/ is
>>the same as http://www.mydomain.com/test/index.html or
>>http://www.mydomain.com/default.htm ?
>>
>>- Jakob
>>
>
>It doesn't know. I imagine that some robots make assumptions and equate
>index.html or default.html with a resource ending in '/', but there's
>nothing in the HTTP spec that guarantees it. The robots I write don't assume
>this, nor do most of the other HTTP related tools I use. It may be
>irritating to have different entries in your database for '/' and
>'/index.html', but it's safer. A given server may have several file names
>which it uses as default. For instance, given two files '/index.cgi' and
>'/index.html', the server may give you the .cgi when you ask for '/', and
>assuming .html would be incorrect even though that resource exists and is
>published.

Neither nor:

It's not the client nor the robot: It's the server that knows.
When setting up your HTTP server, that's one of the configuration
parameters.

So you can configure your server to look for
<Directory URL>/what_ever.html when receiving a request for
<Directory URL>

Cheers,

Harry "Munir Basha" Behrens Tel.: +81-3-3812-2111 #6752
PhD candidate +81-3-3814-4251 #6763
Tanaka Lab
Dept. of Electrical Engineering e-mail: behrens@mtl.t.u-tokyo.ac.jp
University of Tokyo