tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: http to https redirect 301
Date Mon, 01 May 2017 21:12:00 GMT
On 01/05/17 14:23, Yuval Schwartz wrote:
> Tomcat version: 8.0.22
> jdk: 1.8.0_05
> 
> I have a webapp that uses a tomcat server behind a load balancer.
> 
> I recently added a the option to connect to my webapp via https.
> 
> I would like to redirect all http requests to https.
> I achieved this by implementing the instruction outlined here:
> https://elastx.zendesk.com/hc/en-us/articles/214238826-Force-https-with-Tomcat
> 
> However, I notice that this performs a redirect with repsonse code 302
> (moved temporarily). I would like the response code to be 301.
> 
> I found this bug report on the matter:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=59399
> 
> Does this mean that in order to achieve a 301 redirect, I need to update my
> tomcat version?

Yes.

> Is there anyway to achieve a 301 redirect without updating
> the tomcat version?

Without patching Tomcat, no. And that isn't recommended.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message