【发布时间】:2017-06-04 04:47:33
【问题描述】:
我想在 WordPress 中禁用目录浏览。但它不起作用。 请帮我。我已经编辑了 htaccess (Options -Indexes)
这是文件夹 httpd
<Directory "${INSTALL_DIR}/www/">
#
# 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 +Multiviews
#
# 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.
#
# onlineoffline tag - don't remove
Require all granted
</Directory>
<Directory ${INSTALL_DIR}/www/wp-includes>
Options -Indexes
AllowOverride None
Order allow,deny
</Directory>
【问题讨论】:
-
你重启你的httpd了吗?
-
如果我重新启动 apache?答案是肯定的,我重启服务器apache。
标签: apache