I would like to use HAProxy to route the incoming request http://example.com/test/app/v1/foo/bar to http://example.com/v1/app/foo/bar.
I went through the example at Haproxy route and rewrite based on URI path and constructed the regex:
reqrep ^([^\ ]\*)\ /([a-zA-Z]\*)/([a-zA-Z]\*)/([0-9A-Za-z]\*)/(.\*) \1\ /\4/\3/\5
However it doesnt seem to work. Could anyone help figure this out?
Thanks.