squid url redirection

Hi all,

I'd like to point all of my domain traffic to a squid server that will figure for me the url redirection that needed to do:

all urls starting with:
mobile.*.mydomain.com
will go to server1 (tomcat server)
all others will go to server2 (apache server)

the catch is that the URL should not be changed because the tomcat\apache need it to know where to point...

what should I put in squid.conf to do so?

Thanks for the help you guys are the best! :b:
Eliraz.