How to redirect incoming URL IP to a different one depending on source


I have 3 networks (for test). I need users to be redirected to a different URL IP based on what network they are coming from. Example I need to redirect to I need to redirect to, and so on. How do I do this?

I am new to HAProxy so sorry for the novice question