Subdirectories/folders as URLs? (novice question) - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: Subdirectories/folders as URLs? (novice question)

> >Q3:  If this is correct, is there any way around it?  (at the Mac OS 9
> >level, or if I upgrade to Mac OS X)
> You can install a server on your computer, and if you're doing
> serious Web development you probably want to. I don't know of
> specific Mac software to suggest, though.

OS X has an Apache server pre-installed, which will be enabled when you
switch on Personal Web Sharing in Sharing/System Preferences.


Re: Subdirectories/folders as URLs? (novice question)

> My understanding -- I'm not an expert -- is that on (some? many? all?)
> standard Internet servers a URL can point to a subdirectory name
> followed by a backslash...

I believe you mean a solidus: i.e., a forward-slash. But anyway...

> and that links to this URL will automatically go to an "index.html"
> file located in that subdirectory, if there is one.
> Q1:  Is this more or less correct?

It is if the webserver is configured appropriately. If the URL is only a
path -- no document name appended -- the webserver can be configured to
try to return a default document (e.g., "index.html") for that path.
Often several default document names can be specified, in a prioritized

> At least some HTML texts also recommend using this as the basis for
> organizing a web site:
> Q2:  Is this good advice?

Well, subdirectories are useful for organizing files, whether part of a
web site or something else.

Personally, w/regard to default documents, I'm a little on the fence as
to their usefulness. On one hand, it can make life easier for both the
visitor and author to not have to specify a full path (think,
especially, of the home page). The main risk of relying on the server's
default document configuration is that if the site is moved to a
different server with a different configuration, well, the path-only
links may no longer function. This is a small risk, however: it's likely
you'll be able to configure the new server appropriately.

Probably the more important thing, particularly from your visitor's
point of view, is consistency. Don't use in some cases and in others ... if you intend them to refer to
the same document. From the browser's point of view, they are different
documents, which affects caching and visited-link highlighting.

> But if I'm attempting to develop and test a complete web site on my own
> (Mac iBook OS 9) computer before uploading it to my university's server,
> I can't do this, because subdirectories are folders in this environment
> and as best I can tell browsers operating on my own machine can't link
> to folders as URLs.
> Q3:  If this is correct, is there any way around it?

No: the browser has nothing to do with it (almost: the exception is when
the browser request is a path but doesn't end with a forward-slash).
Default documents are handled by a webserver, not by the browser. You
need to run a webserver on your laptop. I'm not sure if one is
included/available for OS9, but OSX comes with Apache and easy setup

Joel. /
"May she also say with just pride:
I have done the State some service."

Site Timeline