1、進入apache的配置檔案 httpd.conf 找到:
<Directory "C:/xampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
2、修改
把 Options Indexes FollowSymLinks Includes ExecCGI那行,改成
#Options Indexes FollowSymLinks Includes ExecCGI
Options FollowSymLinks Includes ExecCGI
就是将Indexes去掉,Indexes表示若目前目錄沒有index.html就會顯示目錄結構。
重新開機Apache伺服器
3、修改前
