diff --git a/html/includes/vars.inc.php b/html/includes/vars.inc.php
index 591851f9f4..a3b4d554c5 100644
--- a/html/includes/vars.inc.php
+++ b/html/includes/vars.inc.php
@@ -13,7 +13,7 @@ foreach ($_GET as $key => $get_var) {
$base_url = parse_url($config["base_url"]);
// don't parse the subdirectory, if there is one in the path
-if (strlen($base_url["path"]) > 1) {
+if (!empty($base_url["path"])) {
$segments = explode('/', trim(str_replace($base_url["path"], "", $_SERVER['REQUEST_URI']), '/'));
} else {
$segments = explode('/', trim($_SERVER['REQUEST_URI'], '/'));