From 6abb9ff637c04e54272cfeaaca503d2347560952 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 18 Jun 2008 20:03:46 +0000 Subject: Hopefully fixed default wwwroot. refs #51 - Misja, if this works for you, could you please close the ticket? git-svn-id: https://code.elgg.org/elgg/trunk@982 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/configuration.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engine') 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; } -- cgit v1.2.3