Incoming forwarding / Proxy based on URL

I have several http servers: (mail, web) in my DMZ. I want to forward incoming traffic to the respective servers based on url, f ex:
www.mydomain.tld → mywebserver
mail.mydomain.tld → mymailserver
How can this be done? I understand that NAT is not an option, because NAT forwarding is established before the url is received, but it could maybe be done by using Web Proxy.
Can anybody please tell me how to configure the router to achieve this?

thank you
Knut

If you’re using HTTP, (Bad bad, you should be using HTTPS) then you can use a regular expression to tag the connection in Prerouting, and use NAT rules from there. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html for HTTP GET request structure. This will work because Mangle Prerouting happens before dst-nat. See here: http://wiki.mikrotik.com/wiki/Manual:Packet_Flow.

If you’re using HTTPS, this is impossible, as the router cannot see the URI being requested. You would need to do SSL termination in a separate box/load balancer.