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

If you go to, I want it to redirect to /something/something on my server, but the URL still shows Is this possible in haproxy?

backend new_marketing_server
  *** set default URL to /something/something***    
  mode http
  balance roundrobin
  timeout server 10m
  option httpclose
  server server1 minconn 32000 maxconn 3200 check port 80 inter 2000
  server server2 minconn 32000 maxconn 3200 check port 80 inter 2000
share|improve this question

Yes it's doable: add the line below in your backend

reqrep ^([^\ ]*)\ /(.*)     \1\ /something/something/\2
share|improve this answer

Yes, this can be done at the level of load balancer such as haproxy (not recommended) and can be done also (recommended) on the web server level. This is because your setup should work with/without load balancer without changing your backend servers config.

If you are using apache or nginx, you can use rewrite rules to change the requested URL

share|improve this answer

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.