From 2dff357a4e2f2e735a045cc53b9e4f2ae9856f33 Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Fri, 11 May 2012 17:06:04 +0200 Subject: [PATCH] add new htaccess things into setup script too --- lib/setup.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index 59e4bf0dee2..5d560931052 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -307,7 +307,7 @@ class OC_Setup { */ private static function createHtaccess() { $content = "ErrorDocument 403 ".OC::$WEBROOT."/core/templates/403.php\n";//custom 403 error page - $content = "ErrorDocument 404 ".OC::$WEBROOT."/core/templates/404.php\n";//custom 404 error page + $content.= "ErrorDocument 404 ".OC::$WEBROOT."/core/templates/404.php\n";//custom 404 error page $content.= "\n"; $content.= "php_value upload_max_filesize 512M\n";//upload limit $content.= "php_value post_max_size 512M\n"; @@ -318,7 +318,12 @@ class OC_Setup { $content.= "\n"; $content.= "\n"; $content.= "RewriteEngine on\n"; - $content.= "RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]\n"; + $content.= "RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]\n"; + $content.= "RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]\n"; + $content.= "RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]\n"; + $content.= "RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]\n"; + $content.= "RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]\n" + $content.= "RewriteRule ^remote/(.*) remote.php [QSA,L]\n"; $content.= "RewriteRule ^.well-known/carddav /apps/contacts/carddav.php [R]\n"; $content.= "RewriteRule ^.well-known/caldav /apps/calendar/caldav.php [R]\n"; $content.= "\n";