我需要从 Laravel 生成的 URL 中删除 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',
我怎么才能改变这一点呢?