Код: Выделить всё
public_html
|- .env
|- .htaccess
|- app
|- bootstrap
|- composer.json
|- public
|- resources
|- routes
|- storage
|- vendor
:
RewriteEngine On
RewriteRule ^$ public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ public/index.php [L]
< /code>
С этой настройкой я могу получить доступ к Laravel, посетив:
Код: Выделить всё
https:///~dramosacКод: Выделить всё
Requested URL: {{ request()->fullUrl() }}
Internal path (request()->path()): {{ request()->path() }}
APP_URL: {{ config('app.url') }}
Current route name: {{ Route::currentRouteName() ?? 'None' }}
Current controller: {{ optional(Route::getCurrentRoute())->getActionName() }}
Authenticated?: {{ Auth::check() ? 'Yes' : 'No' }}
HTTP Method: {{ request()->method() }}
< /code>
Выход: < /p>
Requested URL: https:///~dramosac
Internal path (request()->path()): ~dramosac
APP_URL: https:///~dramosac
Current route name: None
Current controller:
Authenticated?: No
HTTP Method: GET
Question:
Why does Laravel still treat ~dramosac as part of the route, even though APP_URL is set correctly? Как я могу настроить Laravel для обслуживания правильных маршрутов из этой подкаталории?
Заранее!
Подробнее здесь: https://stackoverflow.com/questions/796 ... rname-path
Мобильная версия