У меня есть Laravel v5.5, работающий на apache, и мне нужно реализовать проверку пользователей с помощью сертификатов смарт-карт (с использованием apache SSLVerifyClient require).
Это означает, что мне нужна общая папка, которая будет запрашивать сертификат клиента, и моя структура общих папок следующая:
/public/
|- index.php <-- laravel main bootstrap
|- login/
|- .htaccess <-- let's apache to ask for client cert only on this folder
|- index.php <-- secondary bootstrap, that should work as main bootstrap
Как я могу загрузить laravel из подпапки (public / login / index.php) , чтобы он сохранил пути и маршрутизацию, как в основной загрузке < / strong> (public / index.php) ?
Я пробовал делать
<?php
require_once '../index.php';
и
<?php
// copy-paste the content from ../index.php and change the paths
define('LARAVEL_START', microtime(true));
require __DIR__.'/../../vendor/autoload.php';
$app = require_once __DIR__.'/../../bootstrap/app.php';
// ...
Но оба они обрабатывают маршруты так, как будто "/ login" является домашним корнем "/".
/resources/views/
, а не в общую папку - person Option   schedule 24.10.2017public_path()/login/index.php
? - person Option   schedule 24.10.2017