mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Ensure that ownCloud is always accessed with a trailing slash
This commit is contained in:
parent
d4abbb10d3
commit
125b7e7512
1 changed files with 8 additions and 0 deletions
|
|
@ -169,6 +169,14 @@ class OC {
|
|||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', null);
|
||||
OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue