aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/configuration.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index a033d679f..7383b6a35 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -143,7 +143,9 @@
$CONFIG->wwwroot .= $request;
*/
- $CONFIG->wwwroot = "http://" . $_SERVER['HTTP_HOST'] . str_replace("//","/",str_replace($_SERVER['DOCUMENT_ROOT'],"",$CONFIG->path));
+ $pathpart = str_replace("//","/",str_replace($_SERVER['DOCUMENT_ROOT'],"",$CONFIG->path));
+ if (substr($pathpart,0,1) != "/") $pathpart = "/" . $pathpart;
+ $CONFIG->wwwroot = "http://" . $_SERVER['HTTP_HOST'] . $pathpart;
}