I have Tomcat running Jira. I have two DNS names that are attached to this site - mysite.myorg.com and mysite.myorg.net. I want the mysite.myorg.com to redirect all users to mysite.myorg.net since I have my ssl certificate set up for the .net site.
My question is: which way is the easiest and most reliable to set up this redirect?
Currently I have the .com DNS record as an alias of .net record via a CNAME entry. However, the web browser does not substitute the URL when users access the .com site and this leads to SSL certificate warning message.
Is it possible set up Tomcat to detect if a site is being accessed via a certain URL and issue a 301 response to redirect to a different URL?