mod_rewrite 已启用,.htaccess 文件正常,但请求未通过 index.php
mod_rewrite is enabled, .htaccess file is ok, but requests are not going through index.php
我刚刚安装了 ubuntu-server_6.04.2_LTS,全新安装后我启用了 mod_rewrite,它显示在 phpinfo() 中
我的 .htaccess 文件没问题
但是,请求仍然没有通过 index.php
您应该检查该特定目录(项目的根文件夹)是否配置了 apache 以允许通过 .htaccess 覆盖。
如果你想允许这样的覆盖,在 apache.conf 中找到的指令或你的虚拟主机的特定设置应该如下所示:
<Directory /var/www/>
AllowOverride All
Require all granted
</Directory>
我刚刚安装了 ubuntu-server_6.04.2_LTS,全新安装后我启用了 mod_rewrite,它显示在 phpinfo() 中
我的 .htaccess 文件没问题
但是,请求仍然没有通过 index.php
您应该检查该特定目录(项目的根文件夹)是否配置了 apache 以允许通过 .htaccess 覆盖。
如果你想允许这样的覆盖,在 apache.conf 中找到的指令或你的虚拟主机的特定设置应该如下所示:
<Directory /var/www/>
AllowOverride All
Require all granted
</Directory>