Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom app behind an haproxy server. Can haproxy rewrite the case of the header?

For example changing to

If so, how?

share|improve this question

You can handle this easily enough:

reqrep ^([^\ ]*)\ /ABC(.*)     \1\ /abc\2

However, it is usually more appropriate to handle URL rewrites on the web server (e.g. mod_rewrite), so I would use these type of rewrites sparingly.

share|improve this answer
What if I don't know what the string will be? Is it still possible to do the replace? – Magd Mar 9 '12 at 0:34
For example, I can't predict if it will be,,, – Magd Mar 9 '12 at 0:55
As far as I know, HAProxy cannot transform URLs using a function like that. You'll likely find it easier using rewrite rules in IIS or Apache to solve this issue. – Matt Beckman Mar 9 '12 at 1:46

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.