summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel@molkentin.de>2013-04-24 07:14:33 -0700
committerDaniel Molkentin <daniel@molkentin.de>2013-04-24 07:14:33 -0700
commitff6fb0906b2442b06f7bbac43d178dc919e4c4df (patch)
treeb391db03af880b822be45929112ea88f60622894
parent18debcf6a3fe732eee6f8e516e865568532bbe57 (diff)
parent6ac2fdf44b636243630febd676090e4f6d138d69 (diff)
downloadnextcloud-server-ff6fb0906b2442b06f7bbac43d178dc919e4c4df.tar.gz
nextcloud-server-ff6fb0906b2442b06f7bbac43d178dc919e4c4df.zip
Merge pull request #3100 from owncloud/ensure_index_php
Fix for #3049
-rwxr-xr-x.htaccess3
-rw-r--r--index.html1
-rw-r--r--lib/setup.php4
3 files changed, 8 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
index 463b49993e6..201e0d605b7 100755
--- a/.htaccess
+++ b/.htaccess
@@ -32,5 +32,8 @@ RewriteRule ^remote/(.*) remote.php [QSA,L]
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</IfModule>
+<IfModule dir_module>
+DirectoryIndex index.php index.html
+</IfModule>
AddDefaultCharset utf-8
Options -Indexes
diff --git a/index.html b/index.html
index 69d42e3a0b3..f160f46b6fc 100644
--- a/index.html
+++ b/index.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
+ <script type="text/javascript"> window.location.href="index.php"; </script>
<meta http-equiv="refresh" content="0; URL=index.php">
</head>
</html>
diff --git a/lib/setup.php b/lib/setup.php
index c330729298e..d1197b3ebf3 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.= "</IfModule>\n";
+ $content.= "<IfModule dir_module>\n";
+ $content.= "DirectoryIndex index.php index.html\n";
+ $content.= "</IfModule>\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