diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-12-02 11:41:00 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-12-02 11:41:00 +0100 |
commit | 361093fb7bd21c0e83001ff0639a37056daec2ea (patch) | |
tree | 4cb7bf5a2501197d9570843526a1d99f89115e4c /lib/base.php | |
parent | d4abbb10d3b8b1b6685f239c8e6ec5e19d013680 (diff) | |
parent | 09d9e430d8de207fc9528329e4d0ea49272aa589 (diff) | |
download | nextcloud-server-361093fb7bd21c0e83001ff0639a37056daec2ea.tar.gz nextcloud-server-361093fb7bd21c0e83001ff0639a37056daec2ea.zip |
Merge pull request #20889 from owncloud/fix-logout-for-bjoern
Ensure trailing slash in URIs
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 6a1841fa93b..8c68b887a05 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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); |