Hello!
I have setup a mailserver that serves 3 webservices:
mail.mydomain.de
webmail.mydomain.de
sogo.mydomain.de
In order to ensure that requests are ending up at the same host, I have defined this rule:
acl mail hdr(host) -i mail.mydomain.de hdr(host) -i webmail.mydomain.de hdr(host) -i sogo.mydomain.de
use_backend mail_server if mail
This works as expected.
In addition I want to redirect the following URLs:
hxtp://mydomain.de/mail -> mail.mydomain.de
hxtp://mydomain.de/webmail -> webmail.mydomain.de
hxtp://mydomain.de/sogo -> sogo.mydomain.de
I started with a ACL like this:
acl redir_webmail path_beg /webmail
http-request redirect location https://webmail.%[hdr(host)] code 301 if redir_webmail
The issue here is that when I enter
hxtp://mail.mydomain.de/webmail
this will be redirected to
hxtp://webmail.mail.mydomain.de
and this is incorrect.
Can you please advise?
THX