From a1d76f4873ebcaa66d1b51a20304a9971acf6c29 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 17 Aug 2015 14:32:14 +0930 Subject: [PATCH] Detect base path for installer --- index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index bfac40e..23ab209 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,9 @@ if ($app->bound('flarum.config')) { $app->register('Flarum\Install\InstallServiceProvider'); $flarum = new MiddlewarePipe(); - $flarum->pipe('/', $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.install.routes')])); + + $basePath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + $flarum->pipe($basePath, $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.install.routes')])); $flarum->pipe(new \Franzl\Middleware\Whoops\Middleware()); }