我需要从Laravel中删除 index.php
或public/index.php
从生成的URL中删除;通常路径是localhost/public/index.php/someWordForRoute
,它应该是这样的localhost/someWordForRoute.
.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes.
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php[L]
app / config / app.php
'url' => 'http://localhost',
我该如何改变?
mod_rewrite
已启用。