Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4760

Redirect URI: how to define exakt match, no pattern

$
0
0

@c.monty wrote:

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

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4760

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>