httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] DirectoryIndex for all directories
Date Mon, 03 Feb 2003 08:58:41 GMT
>-----Original Message-----
>From: Andrea [mailto:software@polin.it]
>
>What I found strange is that under my win2000 pc I have
>
>/.htaccess
>DirectoryIndex /index.htm
>(Note that I specified a / before index.htm )
>
>So If I try to call
>servername/
>servername/path/
>servername/path/to/
>servername/path/to/etc/
>
>the script that is called is always
>servername/index.htm

Hang on! - that's right. What I said earlier about the symlinks is
unnecessary... 

	DirectoryIndex /index.htm

This should work in all cases (just checked the docs :-).

>if I change .htaccess as
>DirectoryIndex index.htm
>(Note I removed the / before index.htm)
>then
>1) servername/
>2) servername/path/
>3) servername/path/to/
>4) servername/path/to/etc/
>for case 2,3,4 listing of directory will be showed
>for case 1 index.htm is showed

Exactly.

>So I don't understand why adding a / before index.htm it 
>worked on my pc and

The "/" at the beginning makes the resource relative to the document
root and not relative to the directory. This is described in the docs
for "DirectoryIndex".

>why it didn't work on his server.

It should have. Are you really sure he did it as you described (did you
*see* his config file?). Is his .htaccess file really in the docroot
directory (and not in one of the subdirs).

Why doesn't he post for himself anyhow?

>
>
>:-) Andrea
>
>p.s.
>We are using Apache 1.3.27
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message