Re: URL specification: referring to the current directory.

In article <Pine.SOL.3.93.970909163815.20512D-100000@lamin-0>,
Glen Monks <> wrote:
> My problem is this - how do I refer to the default file "intro.html" while
> in the same directory without having to name it explicitly.  Is href="./"
> valid, or even just href="."?  I expect it is *supported* but that's not
> the point.

The relative URL "./" is the only correct way to refer to the
current "directory" (assuming your server maps URLs into directories
in the usual way).

What your server sends if someone asks for an URL ending in a slash
is entirely up to the server.

> The reason we don't want to explicilty name the file "intro.html" is quite
> a valid one:  Many indexing/searching programs *assume* that the reference
> href="sub-dir/" means "sub-dir/index.html" and so will take
> "sub-dir/intro.html" as a different file, mis-indexing us.

Webcrawlers most definitely DO NOT assume a filename if a link leads
to a 'directory' URL. If the URL is "/foo/bar/" then the client *must*
ask for "/foo/bar" and see what it gets back. It doesn't matter at all
if the server sends the content of
"/usr/local/etc/httpd/htdocs/foo/bar/index.html" or any other file in
that directory, or makes up something out of thin air.

E-mail: .................... PGP Key: 512/63B0E665
Maintainer of WDG's HTML reference: <>

Received on Tuesday, 9 September 1997 13:49:43 UTC