egroupware, iphone, caldav, carddav, and PHP as cgi
Friday, October 28th, 2011iphone requires some groupdav.htaccess to work with caldav and carddav, but their included one didn’t work for me because I use PHP as a CGI.. so here’s my .htaccess file in my public_html folder
- also note that you’ll get an error when setting up card and caldav, that it can’t authenticate you… that ok.. ignore that error.. and hit save
- then in the settings under Mail, Contacts, Calendars -> sync (in the group calendar) set “All events”
- carddav works right away, even though you get that error
here is my modified .htaccess file
# iphone
RewriteEngine On
RewriteRule ^.well-known/(caldav|carddav)$ /egroupware/groupdav.php/ [R]
RewriteCond %{REQUEST_METHOD} ^(PROPFIND|OPTIONS)$
RewriteEngine On
RewriteRule ^$ /egroupware/groupdav.php/ [R]
# iOS 4.3+ calendar requires that to autodetect accounts
RewriteEngine On
RewriteRule ^(principals/.*)$ /egroupware/groupdav.php/$1 [R]
# must be last!
RewriteEngine On
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]