redirect by host_header
I am trying to figure out how I can receive multiple requests to the same ip address and redirect to different servers based off the host_header... Let me give you an example of what I am trying to do:
host to IP:
host1.routeme.com --> 220.127.116.11 (WAN IP)
host2.routeme.com --> 18.104.22.168 (WAN IP)
22.214.171.124 looks at host_header then performs the following:
If host_header = host1.routeme.com redirect to local ip 192.168.0.21 (LAN IP)
If host_header = host2.routeme.com redirect to local ip 192.168.0.22 (LAN IP)
I was thinking that I might have to use a proxy but I cant find one that will redirect using a host_header instead of an IP.
Maybe I am thinking about this the wrong way... Help.