Navigating directories on your web-site ======================================= For simplicity, all files on your web-site, both HTML and images, can be kept in one single directory; but if the site is at all large, it becomes much more logical to spread them over a small number of directories (and avoids too many files per directory). You will then have to work out how to refer to different files (in hyperlinks or image sources) across the directory structure. Firstly, it's up to you as web-author to remember which files are in which directories! If a file you're referring to is in the same (sub)directory as the page you are writing, then you just use the likes of: Continued or the more explicit Continued where the "./" means "in the current directory". If the file you're referring to is inside a directory which is in the same directory as the current page, use for example: or . or Continued etc. If the file you're referring to is in the parent of the directory containing the page you're writing, use something like: Back to Home page where the "../" means "go back up one level". If the file you're referring to is inside a directory which is in the parent of the directory containing the page being written, you'll need to both go up a level and down again, for example Example of a local directory structure on your hard disk: (site root directory) / | | \ / | | \ / | | \ index/html pages images reply/html / | | \ / | | \ / | | \ about/html more/html home/gif photo/jpeg Note the use of a "slash-extension" in RiscOS/ADFS names above, but a "dot-extension" in the unix-style names in the HTML below (and of course, vice versa for (sub-)directory/file separators). Some example fragments of HTML in those pages: in "index": About me
Sign the Visitors' book
[Note 1] You are visitor number Home Page in "about":

Mugshot

More about me [Note 2] in "more": Home Notes: [1] or: Sign the Visitors' book [2] or: More about me The prefix "./" means "starting at the current directory", which is assumed to be the case if no such prefix is given at all; The prefix "../" (note: TWO dots) means "go back up one level to the parent of the current directory"; [3] the prefix "/" means "starting from the root of the WEB-SERVER" (NOT the root of your directory), so you won't be using that (except perhaps for accessing "cgi-bin"). You can of course have more (deeper) levels of sub-directories, and so might have to have references such as: It is a convention that every (sub)directory has an "index.html" file: this means that a reference to eg "./personal/" will in practice result in the server actually returning the file "./personal/index.html". You would probably not want such an index in a directory (eg "icons/") which just contained icon images; in this instance, if the visitor *did* try to access "icons/", the web-server usually automatically generates a file "icons/index.html" which shows a sort of "Filer window" of that directory. John Alldred, 15July97 http://www.argonet.co.uk/users/protovale/john.html