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

Haproxy Prefix redirect with regex match path

$
0
0

Hi all,

I’m trying to redirect domain to another with same path values. What i have tried is given below.
HA-Proxy version: 2.0.13-2 2020/04/01

In my frontend:
http-request redirect prefix http://example.test.com if { hdr(host) -i https://test.com } { path_reg /[a-z0-9_.-]{0,5} }

This is what i’m trying to achieve
When user access https://test.com/7hjl3 it should redirect to http://example.test.com/7hjl3

Any help with this would be great.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4834

Trending Articles



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