summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 342bdc6768e..404f3dd7f91 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -143,6 +143,13 @@ class OC{
$scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName,-1)=='/'){
$scriptName.='index.php';
+ //make sure suburi follows the same rules as scriptName
+ if(substr(OC::$SUBURI,-9)!='index.php'){
+ if(substr(OC::$SUBURI,-1)!='/'){
+ OC::$SUBURI=OC::$SUBURI.'/';
+ }
+ OC::$SUBURI=OC::$SUBURI.'index.php';
+ }
}
OC::$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen(OC::$SUBURI));