apache - 启用 Mod Rewrite 并将 AllowOverride 设置为 All,但 .htaccess 仍然无法正常工作
问题描述
我在 Centos 7 上运行 Apache 2.4.6。正如标题所说,我已经验证了 mod rewrite 已启用,这就是我的 httpd.conf 的样子
<Directory "/var/www/html">
#
# 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
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
但由于某种原因,我的 .htaccess 仍然无法正常工作。现在我只是把我的所有指令放在同一个目录元素中(我没有复制那部分,我知道这不是问题,因为我只是在无法获得 .htaccess 后才这样做的最后手段工作)。如果有人可以提供帮助,将不胜感激。
解决方案
推荐阅读
- swift - socket.on 回调在 socket.io swift 中重复多次
- java - 无法扫描 jar 文件:错误的幻数
- angular - Spring OAuth2 刷新令牌将再次对用户进行身份验证
- html - 如何使用 PowerShell 脚本在电子邮件正文中嵌入 HTML 文件内容?
- java - java.lang.IllegalArgumentException:无法在没有验证证明、会话信息或临时证明的情况下创建 PhoneAuthCredential
- nuget - 如何找出以下 Nuget 包的许可证是什么?
- excel - 如果语句不会将结果复制到单独的页面
- sql - Oracle SQL 在选择和简单集合之间相交
- database - 如何使用函数从 postgresql 中的表名中获取?
- bash - 如何在 Windows 上安装 bash bc 以及在哪里安装