2010-10-21 18:08:09 +02:00
|
|
|
# EGroupware CalDav or CardDAV support for Apple apps (incl. iPhone)
|
2010-09-25 11:08:37 +02:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# This file can be copyied as .htaccess to your document root
|
|
|
|
# to support Mac or iPhone clients to autodetec CalDAV and CardDAV
|
|
|
|
# (currently Addressbook does NOT allow to specify our groupdav.php
|
|
|
|
# URL manually).
|
|
|
|
#
|
|
|
|
# As alternative an EGroupware install directly in the docroot or
|
|
|
|
# an unconditional redirect from the docroot to EGroupware's index.php
|
|
|
|
# will archive the same thing, as it redirects PROPFIND or OPTION
|
|
|
|
# requests to groupdav.php/ (many have such a redirect already in place).
|
|
|
|
#
|
2010-10-21 18:08:09 +02:00
|
|
|
# iCal app does NOT allow multiple redirects, therefore it must be redirected
|
|
|
|
# directly to groupdav.php/ eg. by the following index.php in the docroot:
|
|
|
|
#
|
|
|
|
# <?php
|
|
|
|
# if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND' || $_SERVER['REQUEST_METHOD'] == 'OPTIONS')
|
|
|
|
# {
|
|
|
|
# header("Location: /egroupware/groupdav.php/\n\n");
|
|
|
|
# }
|
|
|
|
# else
|
|
|
|
# {
|
|
|
|
# header("Location: /egroupware/\n\n");
|
|
|
|
# }
|
|
|
|
# exit;
|
|
|
|
#
|
|
|
|
# An other alternativ is to copy the above PROPFIND/OPTIONS redirect
|
|
|
|
# into your index.php in the docroot.
|
2010-09-25 11:08:37 +02:00
|
|
|
#
|
|
|
|
# Please note:
|
|
|
|
# - your Apache web server needs to be setup to read .htaccess files and
|
|
|
|
# allow use of the RewriteEngine directive (AllowOverride FileInfo).
|
|
|
|
# - you need to replace /egroupware with your EGroupware URL path eg. /egw
|
|
|
|
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteBase /
|
|
|
|
|
|
|
|
RewriteRule ^.well-known/(caldav|carddav)$ /egroupware/groupdav.php/ [R]
|
2010-10-19 15:42:37 +02:00
|
|
|
RewriteCond %{REQUEST_METHOD} ^(PROPFIND|OPTIONS)$
|
* CardDAV pref which addressbooks to sync and many fixes for iPhone OS 4.0, 4.1, 4.2beta and Mac iCal and contact app
Merge of following commits from Trunk:
r32609: * GroupDAV preference for addressbook-home-set (requires to register hooks)
r32610: missing groupdav hooks
r32611: fixed missing "users" of principal url in calendar-user-address-set
r32615: as the pricipal of current user is influenced by GroupDAV prefs, we have to include them in the etag
r32619: loop over existing addressbooks, to make sure each ab is only once in addressbook-home-set, even when selected multiple times in the prefs because of symbolic ab like "primary group"
r32620: urlencode and decode account_lid in url to cope with group-names with space in it, which stall iPhone OS 4.2 devices
r32621: fixed bug: GroupDAV/CardDAV PUT request to /addressbook/ changes owner, also checking now required ACL for moving contacts between addressbooks
r32622: returning "403 Forbidden" if addressbook_bo->save() fails, happens when writing new entries in ABs without ADD rights
r32623: * iCal on iPhone detects URL now correct
reverted calendar-home-set to report only users calendar, as reporting multiple break propfind
r32624: we need a real redirect, not just a proxy
r32631: fixed working in GroupDAV prefs and translation
2010-10-21 13:17:46 +02:00
|
|
|
RewriteRule ^/$ /egroupware/groupdav.php/ [R]
|