Re: URL specification: referring to the current directory.

to follow up on what Brian Kelly said:
> 
> The original posting was concerned with how a <A > element should refer
> to the default file in a directory e.g. are
> 
> <A HREF = "./">The default file in the current directory</A>
> <A HREF = "index.html">The default file in the current directory</A>
> 
> equivalent.  
> 

The last time I knew the answer to this question, it was that
they are not equivalent.  The association of a default file with
the directory was a server function, and not bound to the name
index.html across all servers.  Has this practice been
standardized since?

The difference is subtle, but it is a little like how some URLs
point to a location where you regularly update the content and
other URLs point to locations where the content is frozen.

> How should one refer to an internal anchor in such a file.  Are
> 
> <A HREF="./#section1>An internal anchor in the default file</A>
> <A HREF="index.html#section1>An internal anchor in the default file</A>
> 
> equivalent, or with browsers or other user agents treat #section1 as a 
> filename?
> 

If your server serves index.html as the default file when a
directory is addressed in a the Location of a GET request, then
they are equivalent.

If they follow RFC 1808 they will never treat #section1 as a
filename.  They have to strip that before seeking a filename.

See also the updated writeup in the Internet-Draft

  draft-fielding-url-syntax-05.txt

--
Al Gilman

Received on Friday, 12 September 1997 12:50:07 UTC