Use regular expressions to filter files so they are not shown in an index :
An Example might be
IndexIgnore *.js *.gif *.jp?g
One line - simple :-)
Put this is your .htaccess file for a direcrtory until you are happy with how it works - its much easier and less risky than editing the global httpd.conf file
Other alternative is to add an index file which simply has an HTTP redirect to the main page of your site.
Cheers,
Neil Smith.
==============
IndexIgnore directive
Syntax: IndexIgnore file [file] ...
Context: server config, virtual host, directory, .htaccess
Override: Indexes
Status: Base
Module: mod_autoindex
The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a file extension, partial filename, wildcard expression or full filename for files to ignore. Multiple IndexIgnore directives add to the list, rather than replacing the list of ignored files. By default, the list contains `.'.
Example: IndexIgnore README .htaccess *~
========================
At 14:05 23/10/2002 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] From: "Aidal" <[EMAIL PROTECTED]> Date: Wed, 23 Oct 2002 12:36:28 +0200 Subject: Apache - simple question (IndexIgnore)Hi NG. I know this NG is suppose to be about PHP but... Assuming that most of us people reading this NG uses Apache, I have a simple question concerning 'IndexIgnore' in 'httpd.conf'. When typing some http-address to a place under htdocs like http://localhost/somedir/ which does not have an index file to load, the server will list the files in the dir, but there is of cause some files which isn't very wise to list. Say I have some files containing classes or other code in some *.inc files, I want to server to hide these when listing files in dir. Apache has the 'IndexIgnore' to set these things from what I've read, but I can't get this to work properly. The current setting in my 'httpd.conf' is the folowing: IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t I'm not sure exactly what that means, though I've read the documentation on IndexIgnore I still dont get the syntax. Can anyone tell me how I do this? Do I add a new line with 'IndexIgnore <some parameters>' ? Or do I add '<some parameters>' to the existing 'IndexIgnore' ? In any case, what would the syntax be for ignoring *.php and *.inc files when listing? Regards ~ Aidal
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php