Execute only for web and not for CLI

This commit is contained in:
Lukas Reschke 2015-12-02 11:49:33 +01:00
parent 361093fb7b
commit 4d9af08f12
1 changed files with 7 additions and 7 deletions

View File

@ -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