2 回答

TA贡献1801条经验 获得超8个赞
我通过以下方式修复了它:
1.使用以下内容编辑.htaccess我目录中的文件:/public
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
server.php在项目根目录中重命名为index.php
跑了vagrant reload --provision

TA贡献1886条经验 获得超2个赞
看起来重写规则没有在 apache 中正确配置,所以你需要仔细检查一下。
是的,您需要通过index.php
(也称为前端控制器)访问所有内容,因此要访问 hello-world,您需要访问http://exampleurl.test/index.php/hello-world
- 2 回答
- 0 关注
- 111 浏览
添加回答
举报