aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-18 20:03:46 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-18 20:03:46 +0000
commit6abb9ff637c04e54272cfeaaca503d2347560952 (patch)
tree80c6f6e192fdd74e00dd823faff0e95582d09e14 /engine/lib
parenta33fdc7d15a9c8edd3fcff736a23857f4b1e0885 (diff)
downloadelgg-6abb9ff637c04e54272cfeaaca503d2347560952.tar.gz
elgg-6abb9ff637c04e54272cfeaaca503d2347560952.tar.bz2
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
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;
}