If you go to www.company.com, I want it to redirect to /something/something on my server, but the URL still shows www.company.com 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 10.86.151.142:80 minconn 32000 maxconn 3200 check port 80 inter 2000
server server2 10.122.13.189:80 minconn 32000 maxconn 3200 check port 80 inter 2000
Yes it's doable: add the line below in your backend
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
ornginx
, you can use rewrite rules to change the requested URL