I have a Jakarta Tomcat 5 server installed on a Windows 2003 Server machine (hostname labsweb1). There is a DNS entry for www.ourcompany.com
pointing to the ROOT webapp on the labsweb1 server. When I go to http://www.mycompany.com/about/
for example, I get the same page as http://labsweb1/about/
, except that in the web browser the URL remains http://www.mycompany.com/about/
However, if an HTTP redirect header is sent, for example from http://www.mycompany.com/goto.jsp?page=about
then the URL becomes http://labsweb1/about/
instead of http://www.mycompany.com/about/
From what research I've done, this is because Tomcat is by default configured to use the machine's local hostname for resolving redirects, instead of the FQDN from the request. Any idea how to configure Tomcat so that it uses the FQDN from the request for relative redirects?
Please help if you can, thanks in advance!