Apache

Zdenek Pizl zdenek.pizl na pegas-dk.cz
Čtvrtek Červenec 20 10:46:24 CEST 2000


Dne Čt, 20 čec 2000 jste napsal(a):
> Dobry den,
> 
> nevite nekdo, jak zaridit, aby APACHE bral jako hlavni stranku nejen
> index.html ale i index.htm? 

DirectoryIndex

Syntax: DirectoryIndex local-url local-url ...
Default: DirectoryIndex index.html
Context: server config, virtual host, directory, .htaccess
Override: Indexes
Status: Base
Module: mod_dir

The DirectoryIndex directive sets the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the a directory name. Local-url is the
(%-encoded) URL of a document on the server relative to the requested directory; it is usually the name of a file in the directory. Several URLs may be given, in which case the server will return
the first one that it finds. If none of the resources exist and the Indexes option is set, the server will generate its own listing of the directory. 

Example: 

     DirectoryIndex index.html 

then a request for http://myserver/docs/ would return http://myserver/docs/index.html if it exists, or would list the directory if it did not. 

Note that the documents do not need to be relative to the directory; 

     DirectoryIndex index.html index.txt /cgi-bin/index.pl

would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt existed in a directory.




+-------------------------------------------------------------------+
         Zdeněk Pižl, (Corp. yA), http://e2.pef.czu.cz/~xpizl
                mail me only in ISO 8859-2 or in ASCII
+-------------------------------------------------------------------+
           ... what disk do you want to erase today ?? ...


Další informace o konferenci Linux