文件Index最终实现效果

之前遇到的问题:
1.403错误。

2.中文文件名乱码(除非更改浏览器encoding为utf-8)。

3.文件名显示不全。

需要做以下操作:

勾选Indexes选项。

打开注释:

# Fancy directory listings
#Include /Applications/MAMP/conf/apache/extra/httpd-autoindex.conf
Include /Applications/MAMP/conf/apache/extra/httpd-autoindex.conf

修改文件: /Applications/MAMP/conf/apache/extra/httpd-autoindex.conf

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
#IndexOptions FancyIndexing HTMLTable VersionSort
IndexOptions FancyIndexing HTMLTable FoldersFirst Charset=UTF-8 NameWidth=*

==========附相关参数

http://blog.chinaunix.net/uid-10697776-id-2935521.html

  • #ScanHTMLTitles:搜索HTML标题
  • #NameWidth:文件命显示字节数
  • #DescriptionWidth:描述显示字节数
  • #HTMLTable:允许HTML格式
  • #FoldersFirst:目录优先
  • #IconWidth=16图标宽度
  • #IconHeight=16图标高度

设置favicon.ico

屏蔽apache->httpd.conf相关设置

#Alias /MAMP/favicon.ico "/Applications/MAMP/bin/favicon.ico"

清空cache等,重启apache。

 

posted on 2015-04-22 17:55  梦丶想  阅读(905)  评论(0编辑  收藏  举报