Thank you Mark for the inputs. There was indeed a RewriteValve configured.
Updating rewrite.config solved the issue.
Thanks for help.
Thanks,
Atul Pendse
From: Mark Thomas
Date: Thursday, 1 December 2022 at 6:27 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat: Change default redirect
On 01/12/2022 12:29, Atul Pendse wrote:
What is redirecting:
http://test-host/api
to
https://test-host/tgc/index.html
?
Tomcat won't do that out of the box so something in your application (or
possibly something like the Rewrite valve) must be doing it.
Mark
---
Dear Tomcat users/Devs,
We have our app (deployed to tomcat as a war), redirecting all port 80 traffic
to 443.
Currently, anything accessed on port 80 gets redirect response 302.
We are trying to update Tomcat config so that it returns 301 instead of 302.
We have been able to do it for a subset