diff --git a/lib/functions.php b/lib/functions.php index 497e4afa7..4f395af39 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -888,7 +888,7 @@ function isMobile() function getURLPath() { $path = $_SERVER['SCRIPT_FILENAME']; - $prefix = $_SERVER['DOCUMENT_ROOT']; + $prefix = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\'); if (substr($path, 0, strlen($prefix)) == $prefix) { $path = substr($path, strlen($prefix));