On a tomcat 7 server, we've configured a https connector, the TLS certificate is valid for an URL like www.example.com . Now we want to change the A record of one of our subdomains (like foo.bar.com) to point to the tomcat server.
How can I rewrite/process incoming requests from foo.bar.com to use https://www.example.com in order to prevent users from getting certificate errors shown in the browser?