index.php
或public/index.php
,通常路径是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
。 - Kryten