diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-12-08 08:10:55 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-12-08 08:10:55 +0100 |
commit | 3bce1b20feb9525e7e2214c576f125077ffb112d (patch) | |
tree | ac3cbf9a2ada55e5a77ab90184d813ca6d19af3f /.htaccess | |
parent | b15d77c93459743e5e3e29ebefeba0d6fca11b96 (diff) | |
download | nextcloud-server-3bce1b20feb9525e7e2214c576f125077ffb112d.tar.gz nextcloud-server-3bce1b20feb9525e7e2214c576f125077ffb112d.zip |
Add DirectorySlash to dynamic .htaccess write
When `DirectorySlash off` is set then Apache will not lookup folders anymore. This is required for example when we use the rewrite directives on an existing path such as `/core/search`. By default Apache would load `/core/search/` instead `/core/search` so the redirect would fail here.
This leads however to the problem that URLs such as `localhost/owncloud` would not load anymore while `localhost/owncloud/` would. This has caused problems such as https://github.com/owncloud/core/pull/21015
With this change we add the `DirectorySlash off` directive only when the `.htaccess` is writable to the dynamic part of it. This would also make `localhost/owncloud` work again as it would trigger the 404 directive which triggers the redirect in base.php.
Diffstat (limited to '.htaccess')
-rw-r--r-- | .htaccess | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/.htaccess b/.htaccess index 230f6ae330f..05d142348b5 100644 --- a/.htaccess +++ b/.htaccess @@ -50,9 +50,6 @@ # Rewrite rules for `front_controller_active` Options -MultiViews - <IfModule mod_dir.c> - DirectorySlash off - </IfModule> RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1] RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1] RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff)$ |