2

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

For example changing http://www.company.com/ABC to http://www.company.com/abc

If so, how?

1 Answer 1

1

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.

3
  • 1
    What if I don't know what the string will be? Is it still possible to do the replace?
    – Magd
    Mar 9, 2012 at 0:34
  • For example, I can't predict if it will be company.com/TEST, company.com/ABC, company.com/DOG, company.com/WHAT/EVER.
    – Magd
    Mar 9, 2012 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. Mar 9, 2012 at 1:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .