URLRewriteFilter HTTP 到 HTTPS 规则返回 net::ERR_TOO_MANY_REDIRECTS
我在具有 SSL 证书的 EC2 ELB 后面使用 URLRewriteFilter 运行 Tomcat,ELB 将流量从端口 80 和 443 重定向到后端实例中的端口 8080。 URLRewriteFilter 有这个规则:
<rule>
<condition type="scheme" operator="notequal">https</condition>
<condition name="host" operator="equal">ELB-DNS</condition>
<from>^/(.*)</from>
<to type="permanent-redirect">https://ELB-DNS/$1</to>
</rule>
但是当我尝试点击它时,我得到了这个:
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
I have Tomcat running with URLRewriteFilter behind an EC2 ELB with SSL certs,the ELB is redirecting traffic from ports 80 and 443 to port 8080 in the backend instances. URLRewriteFilter has this rule:
<rule>
<condition type="scheme" operator="notequal">https</condition>
<condition name="host" operator="equal">ELB-DNS</condition>
<from>^/(.*)</from>
<to type="permanent-redirect">https://ELB-DNS/$1</to>
</rule>
but when I try hitting it, I got this:
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试设置
port
条件:Try setting the
port
condition: