来源地址:
Description: Various configuration settings for directory indexing
Syntax: IndexOptions [+|-]option [[+|-]option] ...
Context: server config, virtual host, directory, .htaccess
Override: Indexes
Status: Base
Module: mod_autoindex
The IndexOptions directive specifies the behavior of the directory indexing. Option can be one of
Charset=character-set (Apache 2.0.61 and later)
The Charset keyword allows you to specify the character set of the generated page. The default is either ISO-8859-1 or UTF-8, depending on whether the underlying file system is unicode or not.
Example:
IndexOptions Charset=UTF-8
Apache 2默认使用ISO-8859-1或UTF-8编码。上传的文档目录和文件名称则使用了GBK编码字符,导致每次需要手工选择编码之后,才能正确显示其列出 的目录和文件名列表。为了设置以GBK编码显示目录和文件名列表,可以在Apache 2中设置上述选项:
++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://blog.csdn.net/jom_ch/archive/2008/06/25/2585509.aspx
使用IndexOptions FancyIndexing选项,
当访问没有DirectoryIndex指定文档的目录时,启用该选项可以针对目录下不同类型的文档指定相对应的icon
示例如下:
编辑httpd.conf,把下列代码放于任意位置:
IndexOptions FancyIndexing AddIcon /other/icons/exe.gif .bin .exe AddIcon /other/icons/dir.gif ^^DIRECTORY^^ AddIcon /other/icons/txt.gif .txt .php .PHP AddIcon /other/icons/html.gif .htm .html AddIcon /other/icons/image.gif .gif .jpg .bmp .png
重启apache