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個贊
看起來重寫規(guī)則沒有在 apache 中正確配置,所以你需要仔細檢查一下。
是的,您需要通過index.php
(也稱為前端控制器)訪問所有內容,因此要訪問 hello-world,您需要訪問http://exampleurl.test/index.php/hello-world
- 2 回答
- 0 關注
- 140 瀏覽
添加回答
舉報