URLs LoadBalancing

Hello

I have this setup

  1. HAProxy Server
  2. Two Nginx web servers

I need to redirect user according to the URLs
But the URLs is variable not static URLs (domainname/variablename)
I used (balance url_param id) but it isn’t work

This is my haproxy configuration

frontend haproxynode
bind *:80
bind *:443 ssl crt /etc/haproxy/certs/domainname.pem
http-request redirect scheme https unless { ssl_fc }
mode http
default_backend backendnodes

backend backendnodes
mode http
balance url_param id
option httpchk
hash-type consistent
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk HEAD / HTTP/1.1\r\nHost:localhost
server node1 x.x.x.x:4444 check ssl verify none
server node2 x.x.x.x:4444 check ssl verify none

Kindly i need your support

Thanks