Haproxy redirect subdomain to room

I have been looking for a while to make a subdomain per room.
I go through an HAproxy, I tried different methods (
http-request redirect code 301 location https: //visio.domain.tld/room if {hdr_beg (host) -i visio.domain.tld}! {path -i -m beg / room}, http-request set-uri / room if {hdr_beg (host) -i visio.domin.tld}! {path -i -m beg / room} …

but it’s still a failure, with message:
Uh oh! We couldn’t fully download everything we needed :frowning:
We will try again shortly. In the mean time, check for problems with your Internet connection!
and a counter.

On the other hand if I put no rules and that I type visio.domain.tld / room directly in url it works.

Thanks for your help.