From dbda996a7a04ce96803e045dfaf27d1c577c3f4e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 3 Mar 2021 11:37:58 +0300 Subject: previous one was not good enough i guess --- classes/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/config.php b/classes/config.php index ca93bb650..e94bcabb6 100644 --- a/classes/config.php +++ b/classes/config.php @@ -284,7 +284,7 @@ class Config { $proto = self::is_server_https() ? 'https' : 'http'; $self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; - $self_url_path = preg_replace("/\w+\.php$/", "", $self_url_path); + $self_url_path = preg_replace("/\w+\.php(\?.*$)?$/", "", $self_url_path); if (substr($self_url_path, -1) === "/") { return substr($self_url_path, 0, -1); -- cgit v1.2.3