Execute only for web and not for CLI
This commit is contained in:
parent
361093fb7b
commit
4d9af08f12
14
lib/base.php
14
lib/base.php
|
@ -167,14 +167,14 @@ class OC {
|
||||||
// a web URL, so we use overwritewebroot as a fallback.
|
// a web URL, so we use overwritewebroot as a fallback.
|
||||||
OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
|
OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve /owncloud to /owncloud/ to ensure to always have a trailing
|
// Resolve /owncloud to /owncloud/ to ensure to always have a trailing
|
||||||
// slash which is required by URL generation.
|
// slash which is required by URL generation.
|
||||||
if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT &&
|
if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT &&
|
||||||
substr($_SERVER['REQUEST_URI'], -1) !== '/') {
|
substr($_SERVER['REQUEST_URI'], -1) !== '/') {
|
||||||
header('Location: '.\OC::$WEBROOT.'/');
|
header('Location: '.\OC::$WEBROOT.'/');
|
||||||
exit();
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// search the 3rdparty folder
|
// search the 3rdparty folder
|
||||||
|
|
Loading…
Reference in New Issue