wamp不显示文件图标
效果如下图
- 右键图片“在新的标签页打开图片”后会跳转到404页面,并显示
The requested URL /icons/unknown.gif was not found on this server.
解决方案
-
去掉
httpd.conf
文件中Include conf/extra/httpd-autoindex.conf
前面的'#' -
配置
wampinapacheapache2.4.9confextra
目录里httpd-autoindex.conf
文件 -
将文件中下面模块
Alias /icons/ "c:/Apache24/icons/"
<Directory "c:/Apache24/icons">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>
修改为:
Alias /icons/ "icons/"
<Directory "icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
- 重启apache所有服务
Restart All Services
配置后文件图标正常,如下
- 右键图片“在新的标签页打开图片”,会正常显示图片