18
如何在URL生成的Laravel中删除“ public / index.php”?
我需要从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', 我该如何改变?