I am trying to use iptables to build a firewall that inspects traffic. I want iptables to look at the http header and upon match to route/nat to specific internal ip. For example:

I have two internal webservers and the external domain is mydomain.com. I want all traffic assigned to www.mydomain.com goes to and traffic assigned to users.mydomain.com goes to

Is that possible to do that with iptables?