From a86fe7920bd4b49f56fe4448a047e07c0356b43b Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 24 Apr 2013 15:11:53 +0200 Subject: [PATCH 1/2] Try to prefer index.php over index.html in the same directory Add JS redirect if that fails (HTTP-based redirects are disabled by default in more recent Firefox versions). --- .htaccess | 3 +++ index.html | 1 + 2 files changed, 4 insertions(+) diff --git a/.htaccess b/.htaccess index 463b49993e..201e0d605b 100755 --- a/.htaccess +++ b/.htaccess @@ -32,5 +32,8 @@ RewriteRule ^remote/(.*) remote.php [QSA,L] AddType image/svg+xml svg svgz AddEncoding gzip svgz + +DirectoryIndex index.php index.html + AddDefaultCharset utf-8 Options -Indexes diff --git a/index.html b/index.html index 69d42e3a0b..f160f46b6f 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,7 @@ + From 6ac2fdf44b636243630febd676090e4f6d138d69 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 24 Apr 2013 15:11:58 +0200 Subject: [PATCH 2/2] sync parameters in setup.php with the ones in the actual .htaccess --- lib/setup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index c330729298..d1197b3ebf 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -828,6 +828,10 @@ class OC_Setup { $content.= "AddType image/svg+xml svg svgz\n"; $content.= "AddEncoding gzip svgz\n"; $content.= "\n"; + $content.= "\n"; + $content.= "DirectoryIndex index.php index.html\n"; + $content.= "\n"; + $content.= "AddDefaultCharset utf-8\n"; $content.= "Options -Indexes\n"; @file_put_contents(OC::$SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it