HAProxy community

How set default path when it is missing


I would like to add default path if it is missing on specific domain request, but with my HA-Proxy version 1.5.18 2016/05/10 I don’t have set-path command!
What I need to do:
when I write in my brwoser https://www.mydomain.com
I must be redirect to https://www.mydomain.com/webapp1

I tried a lot about this problem but I only found rewrite rules when the path is already there.


It’s just /, it’s no that the path is missing.

Try something like this (careful of the spaces):
reqrep ^([^\ :]*)\ /\ (.*) \1\ /webapp1\ \2


Hi lukastribus,
what you are suggested works fine!
Thank you