如何删除URL生成的Laravel中的“public / index.php”?
我需要删除 index.php
或public/index.php
从Laravel生成的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.php
'url' => 'http://localhost',
我怎么能改变呢?
阿晨1998
MM们