Merge pull request #20889 from owncloud/fix-logout-for-bjoern
Ensure trailing slash in URIs
This commit is contained in:
commit
361093fb7b
|
@ -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);
|
||||
|
|
|
@ -114,7 +114,7 @@ class URLGenerator implements IURLGenerator {
|
|||
$urlLinkTo = \OC::$WEBROOT . '/core/' . $file;
|
||||
} else {
|
||||
if ($frontControllerActive && $file === 'index.php') {
|
||||
$urlLinkTo = \OC::$WEBROOT;
|
||||
$urlLinkTo = \OC::$WEBROOT . '/';
|
||||
} else {
|
||||
$urlLinkTo = \OC::$WEBROOT . '/' . $file;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue