Re: htaccess and indexes

by David Sharp <David.Sharp(at)sharp-words.com>

 Date:  Tue, 21 Aug 2001 08:15:54 +0200
 To:  <hwg-techniques(at)hwg.org>
 References:  apple Server
  todo: View Thread, Original
At 7:03 +0200 21/08/01, I wrote:

>NB: A different suggestion, sent privately, proposed:
>
>Options -Indexes
>ErrorDocument 403 /index.phtml
>
>This seems to work also, but the "DirectoryIndex" directive looks 
>simpler to my inexperienced eyes.

I have now noticed an important difference between the "indexes" 
option and the "DirectoryIndex" Directive, which has made me switch 
to the former.

For a technical reason (I'm installing a Hypermail archive on my 
site), some directories other than the root now contain index files.

With the "DirectoryIndex" directive, requests to all directories 
which ended with a "slash" rather than containing the name of the 
index file were also rerouted to the root address.

With the "Indexes" option, that didn't happen.

This means that users are now redirected to the root address whenever 
they try to access  directory that doesn't contain an index file, but 
*not* when the directory does contain one.

Just what I wanted.

-- 
David Sharp, journalist(e), France <mailto:david.sharp(at)sharp-words.com>
Site personnel / Personal home page http://www.sharp-words.com/
Site et forum  / Press site & mailing list: http://www.presse-en-ligne.com/

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA