Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I conditionally redirect HTTP connections to HTTPS with Tomcat?

0
Posted

How can I conditionally redirect HTTP connections to HTTPS with Tomcat?

0

I’d like to be able to conditional redirect HTTP connections to HTTPS in Tomcat. Here’s the scenario. -All Internet based traffic should be redirected to HTTPS. -All localhost and local trafic (10.x.x.x, 172.y.x.x, 192.168.x.x) should NOT be redirected; talking HTTP is fine. Regular Apache will let me do this because the URL rewriting logic can look at the interface the traffic comes in on. I can send all traffic that comes in on the public facing IP address to HTTPS and leave the rest alone. How can I accomplish the same thing with Tomcat?

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123