Partial and Full URL's
You can (and should) access related documents on the same server with
partial URL's.
To make a partial URL: leave off the protocol, domain, and port, and then,
if you wish to access a document in:
- the same directory
- use just the filename
- a lower directory
- use the directory name, with no initial /,
followed by the filename
- in any other directory
- use the entire path from the document root, with an
initial /.
Consider the following directory tree:
/
my-tree/
directory-1/
document-1a
document-1b
directory-11/
document-11a
directory-2/
document-2a
document-2b
directory-3/
this-page
document-3a
directory-31/
document-31a
document-31b
|
<--the Document Root directory
|
So within the document called this-page, the following
partial URL's will work
- <a href="document-3a">item 3a</a>
- (same directory)
- <a href="directory-31/document-31b">item 31b</a>
- sub-directory to the current
- <a href="/my-tree/directory-2/document-2a">item
2a</a>
- non sub-directories must be declared from the document
root. They will start with a '/'. (You can't depend on
Unix's '../' function working on every server, I think.)
You should not mention the protocol or domain in
partial URL's.
Partial URL's are much easier to maintain than full URL's -- when
you need to move a set of related documents, you
can move the whole directory tree, and you don't have to change any
links.
Last modified: Wed Mar 27 14:12:21 MST 1996