From 5d720ee9b2bb678f014c9314f277f146a814395e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 22 Oct 2020 11:51:40 +0200 Subject: [locationinfo] Relative paths for assets in rewrite mode In conjunction with the proper reqrite rule, this makes it possible to entirely server the info panel from a dedicated virtual directory, in our case, /panel/ --- modules-available/locationinfo/page.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index ec7f25ed..bc918765 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -1026,8 +1026,8 @@ class Page_LocationInfo extends Page } $data = array(); - preg_match('#^(.*)/#', $_SERVER['PHP_SELF'], $script); - preg_match('#^([^?]+)/#', $_SERVER['REQUEST_URI'], $request); + preg_match('#^/(.*)/#', $_SERVER['PHP_SELF'], $script); + preg_match('#^/([^?]+)/#', $_SERVER['REQUEST_URI'], $request); if ($script[1] !== $request[1]) { $data['dirprefix'] = $script[1] . '/'; } -- cgit v1.2.3-55-g7522