diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-03 16:35:52 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-03 16:35:52 +0000 |
commit | b615415b26cb1560439b779eee1a6a9428929bed (patch) | |
tree | 670a76d793d94122322d687bc33a317b39b28691 | |
parent | 0ff224e1e98650c2620db56255c59cf85a09d263 (diff) | |
download | elgg-b615415b26cb1560439b779eee1a6a9428929bed.tar.gz elgg-b615415b26cb1560439b779eee1a6a9428929bed.tar.bz2 |
Fixed wwwroot
git-svn-id: https://code.elgg.org/elgg/trunk@62 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/configuration.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index dfbc95279..6b2bfbb49 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -33,12 +33,23 @@ if (empty($CONFIG->wwwroot)) {
$CONFIG->wwwroot = "http://" . $_SERVER['SERVER_NAME'];
- if (strripos($_SERVER['DOCUMENT_ROOT'],"/") < (sizeof($_SERVER['DOCUMENT_ROOT']) - 1)) {
+ /*if (strripos($_SERVER['DOCUMENT_ROOT'],"/") < (strlen($_SERVER['DOCUMENT_ROOT']) - 1)) {
$CONFIG->wwwroot .= "/";
- }
- $CONFIG->wwwroot .= str_replace($_SERVER['DOCUMENT_ROOT'],"",$CONFIG->path);
+ }*/ + + $request = $_SERVER['REQUEST_URI']; + + if (strripos($request,"/") < (strlen($request) - 1)) { + // addressing a file directly, not a dir + $request = substr($request, 0, strripos($request,"/")+1); + } + + $CONFIG->wwwroot .= $request; +
+ //$CONFIG->wwwroot .= str_replace($_SERVER['DOCUMENT_ROOT'],"",$CONFIG->path); +
}
-
+
if (empty($CONFIG->url))
$CONFIG->url = $CONFIG->wwwroot;
@@ -46,8 +57,8 @@ $CONFIG->sitename = "New Elgg site";
if (empty($CONFIG->debug))
- $CONFIG->debug = false;
-
+ $CONFIG->debug = false; +
}
?>
\ No newline at end of file |