add PT to follow alias

This commit is contained in:
CSchulz 2017-11-20 11:50:13 +00:00
parent 79a3cb9e33
commit cea49fe4a1

View File

@ -26,13 +26,14 @@ Alias /davical /usr/share/davical/htdocs
<IfModule mod_rewrite.c>
RewriteEngine On
# PT is important if you are using an alias, it implies L
# Redirect /.well-known URLs
RewriteRule ^/\.well-known/(.*)$ /davical/caldav.php/.well-known/$1 [NC,L]
RewriteRule ^/\.well-known/(.*)$ /davical/caldav.php/.well-known/$1 [NC,PT]
# Optionally: redirect /principals/users/ as well
RewriteRule ^/principals/users/(.*)$ /davical/caldav.php/$1 [NC,L]
RewriteRule ^/principals/resources/(.*)$ /davical/caldav.php/$1 [NC,L]
RewriteRule ^/calendars/__uids__/(.*)$ /davical/caldav.php/$1 [NC,L]
RewriteRule ^/addressbooks/__uids__/(.*)$ /davical/caldav.php/$1 [NC,L]
RewriteRule ^/principals/users/(.*)$ /davical/caldav.php/$1 [NC,PT]
RewriteRule ^/principals/resources/(.*)$ /davical/caldav.php/$1 [NC,PT]
RewriteRule ^/calendars/__uids__/(.*)$ /davical/caldav.php/$1 [NC,PT]
RewriteRule ^/addressbooks/__uids__/(.*)$ /davical/caldav.php/$1 [NC,PT]
# Optionally: Put DAViCal in the root
# NOTE: this will break other applications that rely on mod_rewrite!