Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Can I configure haproxy to redirect a url ending in /video1?autoplay=1 to a different url but keeping the querystring value?



needs to redirect to


I can do the acl to match the /video1 but cannot work out how to throw away everything to the left of the querystring

Thanks in advance

share|improve this question

2 Answers 2

I don't think HAproxy's current version has support for this kind of redirection. Does it really need to be HAproxy? Maybe you can also use Apache on the localhost and make it listen to say, port 81, and do the redirection but keep the query string through mod_rewrite. This will, of course, add an overhead, though.

share|improve this answer

Could you explain what it would be useful for ? It might be easy to implement in haproxy and could even be done before dev16 in a few days, but before adding features I need to be convinced about their use.

share|improve this answer
I single use case: website moved (from one domain to other) –  jrumbinas Apr 6 '13 at 15:35
no, look, the request is changed, not only the domain. –  Willy Tarreau Apr 24 '13 at 6:52
Oops, I haven't noticed it... How about redirect keeping the same query string? –  jrumbinas Apr 24 '13 at 13:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.