summaryrefslogtreecommitdiff
path: root/classes/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/config.php')
-rw-r--r--classes/config.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/config.php b/classes/config.php
index 6ebe31e2d..afb182440 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -465,9 +465,11 @@ class Config {
/** generates reference self_url_path (no trailing slash) */
static function make_self_url() : string {
$proto = self::is_server_https() ? 'https' : 'http';
- $self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
+
+ $self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$self_url_path = preg_replace("/\w+\.php(\?.*$)?$/", "", $self_url_path);
+ #$self_url_path = preg_replace("/(\?.*$)?$/", "", $self_url_path);
if (substr($self_url_path, -1) === "/") {
return substr($self_url_path, 0, -1);