Search code examples
httphttp-redirecttomcat7root

Tomcat app http to https redirect displays ROOT in URL


Context path is set to ROOT in tomcat app because I want to access the URL without any path ex: https://URL/. AWS Loadbalancer just redirects to the app servers. It works if I directly access https site. But if I access http site, the http to https redirect takes to https://URL/ROOT and displays "page not found", then I'd to remove the ROOT to access the page. If any path is set in the context i.e https://URL/PATH/, the redirection works good but only if ROOT, http redirection is having this issue. I guess context.xml, web.xml, server.xml looks good to me. Obviously needs some tweak. Any help is appreciated please.


Solution

  • http listener rules had ROOT instead of default {path} hence why redirection happened. Right now it is fixed and I don't see ROOT in the http URL redirecting to https.