Web Directory Structures

Aaron Bradley abradley at bowest.awinc.com
Tue Apr 2 16:12:00 EST 1996


Leslie Hassett wrote:

>We are nearly ready to put our Library web site up for the 
>public. I have made the directory structure as follows:

>About (hours, mission, policies, location, etc.)
>Collections (holdings descriptions, arrangements, etc.)
>Services (ILL, Reference, Circulation, etc.)
>Searchable Resources (catalogs, databases, Internet, etc.)

...

>When our site goes up, it will be moved to the main 
>University server. We have just been informed that at that 
>time all of our files will need to be in one directory.

>What do you all think about so many pages being all in one 
>directory?

You should definitely split your files between directories,
for a variety of reasons.

The most important, and often overlooked, reason is the way
in which web server software can feed up a particular file from a
directory name.  A request for a directory name, without a file
extension, will usually return a pre-named file, usually
"index.html".  For example, the url
        http://www.server.com/info/
will usually return the file
        http://www.server.com/info/index.html
I say "usually" because the web server actions are configurable,
and for some reason or another web administrators will sometimes
not enable this feature or change the default file name from
"index.html".  (Your new web administrator will be able to tell
you this.)  So, with your planned structure, you can put the
four different types in information in four different directories,
and name your main index file for each "index.html" -- that way
you'll only have to refer to the directory name in urls
(in an internal link, for example, "about/" versus 
"about/home.html", etc.).  If everything is in one directory,
only one automatically retrievable index ("index.html") will
be possible.

One experience I think all Web page administrators share is how
quickly Web resources can grow.  Consequently, by keeping
different types of information in different directories, you'll
be allowing for future growth, and avoiding having to create
unmanageable file names to differentiate between pages.

>Of course it has a big impact on 
>the structure of the internal page links. 

I take it by this that your internal links will contain
relative ("/lib/about.html") versus absolute
("http://www.server.com/lib/about.html") addresses -- as
it should.  Have you been told which directory you're
getting?  If not, be careful not to include root directory
references (i.e. use "about/hours.html" instead of
"/about/hours.html").

As others have pointed out there's no reason why you
can't be granted sub-directories -- is your sys admin a
control freak?

Bonne chance.

Aaron Bradley
abradley at bowest.awinc.com
Peace and Security WWW Server
http://www.cfcsc.dnd.ca



More information about the Web4lib mailing list