Am 25.02.20 um 16:57 schrieb Christopher Schultz: > Felix, > > On 2/25/20 10:53, Felix Schumacher wrote: > > as more and more browsers are marking http as unsecure, we should > > redirect all http requests to tomcat.apache.org to https. > > > We can enable that by adding a rewrite rule to the .htaccess file > > in the xdocs folder of our site repo. > > > For JMeter we used the following fragment: > > > RewriteEngine On > > > # Redirect http to https # From Cordova PMC Member raphinesse # > > https://s.apache.org/An8s > > > # If we receive a forwarded http request from a proxy... > > RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR] > > > # ...or just a plain old http request directly from the client > > RewriteCond %{HTTP:X-Forwarded-Proto} ="" RewriteCond %{HTTPS} > > !=on > > > # Redirect to https version RewriteRule ^ > > https://%{HTTP_HOST}%{REQUEST_URI} [L] > > Query string? Or is that part of REQUEST_URI?
If I read the documentation for REQUEST_URI right, that QUERY_STRING is not part of it. Hm, another way to do this would probably be RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [L] Taken partly from https://cwiki.apache.org/confluence/display/HTTPD/RewriteHTTPToHTTPS Do you think that would be better? Felix > > > Anything against adding this to our .htaccess file? > > +1 > > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org