0
我已經安裝了一個新的流明框架。但它只路由'/'路由。 在其他路由上,它只返回'/'主頁。只有根路由工作[Lumen laravel]
這是我的.htaccess文件。
<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]
我web.php
是這樣
$app->get('/', function() use ($app) { return " it is working";
});
$app->get('hello', function() use ($app) { return "it is not working";
});
PS: - AllowOverride
設置All
在httpd.conf文件。
你能告訴我們你的''web.php''代碼嗎?另外,你正在運行什麼開發設置? '''PHP的工匠服務',宅基地?我們需要更多的信息來幫助你。 – Mark
@Mark我用web.php更新了這個問題,是的,它是宅基地開發。 –
@Mark問題只與流明5.4,與5.3和5.2 ..很好地工作! –