On 04.02.20 20:31, Hua Zhang wrote: > Best tomcat team, > > Hereby I have a question about an issue I found by using RewriteValve > on tomcat 9.30 > > The rewrite.config is very simple: > > /RewriteCond %{HTTP_HOST} =youkoop.com <http://youkoop.com> > RewriteRule ^.*$ https://www.youkoop.com [R=301,L] > / > > All I want is just redirect a naked root domain to a www domain with > HTTPS. > > The redirection works on HTTP but not HTTPS. > > http://youkoop.com => https://www.youkoop.com *works* > Note: Images don't get through in this mailing list. I can imagine what "works" means, but for your next example: Please elaborate what "does not work" means. > > *https*://youkoop.com <http://youkoop.com> => > https://www.youkoop.com *does not work*
First thing to test: Does https://youkoop.com work without the redirect, then with the "wrong" host name? Otherwise it might be as simple as a misconfigured TLS host that's never invoked because of a certificate mismatch. Olaf