diff --git a/lib/base.php b/lib/base.php index 8c68b887a0..ed397d6a0e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -167,14 +167,14 @@ class OC { // a web URL, so we use overwritewebroot as a fallback. OC::$WEBROOT = OC_Config::getValue('overwritewebroot', ''); } - } - // Resolve /owncloud to /owncloud/ to ensure to always have a trailing - // slash which is required by URL generation. - if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT && - substr($_SERVER['REQUEST_URI'], -1) !== '/') { - header('Location: '.\OC::$WEBROOT.'/'); - exit(); + // Resolve /owncloud to /owncloud/ to ensure to always have a trailing + // slash which is required by URL generation. + if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT && + substr($_SERVER['REQUEST_URI'], -1) !== '/') { + header('Location: '.\OC::$WEBROOT.'/'); + exit(); + } } // search the 3rdparty folder