Category Archives: activesync

How to fix RewriteRule recursion?

I am running tine (tine20.org) on an Ubuntu 12.04 server using Plesk to configure it. In Plesk I have a subdomain (tine.mydomain.com). In the webserver configuration of this subdomain I added those lines:

RewriteEngine on
RewriteRule /Microsoft-Server-ActiveSync(.*) /index.php?frontend=activesync [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

I copied it from the Tine wiki: https://www.tine20.org/wiki/index.php/Admins/Synchronisation

When I try to connect to tine.mydomain.com/Microsoft-Server-ActiveSync I get an Error 500 and in the log those lines:

[Fri Nov 21 19:46:36 2014] [debug] core.c(3112): [client 2.206.3.119] r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /phppath/cgi_wrapper/Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] core.c(3118): [client 2.206.3.119] redirected from r->uri = /Microsoft-Server-ActiveSync
[Fri Nov 21 19:46:36 2014] [debug] mod_deflate.c(700): [client 2.206.3.119] Zlib: Compressed 621 to 379 : URL /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/Microsoft-Server-ActiveSync 

So there's some kind of recursion but I don't know why and how to fix it. How do I fix it?