index.html files (Re: [Techtalk] Resolving a doman name)

James Allen james_allen at cox.net
Mon Jan 24 21:28:11 EST 2005


Mary wrote:
  > Yeah, if you're going to want to address your website files by name,
> there's no real need to call them index.html. index.html is a
> (configurable, almost always on by default) convention
> for the webserver -- when I'm asked for a *directory*, I will instead
> return the contents of the file in the directory called "index.html".
> 
> I tend to like avoiding links to them, you can generally do:
> href="http://example.com/" instead of href="http://example.com/index.html"
> href="/" instead of href="/index.html" (that's a relative link to the
> root of your own domain)
> href="./" instead of href="index.html" (that's a relative link to the
> directory you're in)
> 
> The reason I like to do this is that the fact that the base file is
> stored in index.html is an implementation detail. One day you might want
> to store it in index.php. One day your whole site might be managed by a
> single script. It's easier to never expose index.html than to try and
> support it later when you're not using HTML files at all. (Extensions on
> web file names are also implementation details, and some people turn
> them off too.)
> 
> -Mary

I am running Debian Sarge and Apache2. All my directories work with the 
/ at the end except the root of my domain. It did when using 1.3 but 
with 2.0 the apache-default/ page is returned instead of the contents of 
index.html. There must be a config somewhere, but I've looked over the 
apache2.conf and am at a loss.

James



More information about the Techtalk mailing list