0
我是Laravel的新手。我想寫我的路線,不包含根文件夾。這是目前我的路線,其中laravel是我的根文件夾,如何在沒有根文件夾的情況下在Laravel中編寫路線
Route::get('laravel/cars', '[email protected]');
,這是我想要的,
Route::get('cars', '[email protected]');
下面是我的.htaccess文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]