Mod rewrite 重写https Apache/Tomcat url
我使用apache连接tomcat mod_jk,我设置了两个虚拟主机:Mod rewrite 重写https Apache/Tomcat url,mod-rewrite,Mod Rewrite,我使用apache连接tomcat mod_jk,我设置了两个虚拟主机: myexample_8080.conf myexample_4430.conf 我想将所有请求从http重定向到https,并在重定向到tomcat url的主页上 这是我在myExample8080.conf中的第一条规则 RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://myexample.com/
myexample_8080.conf
myexample_4430.conf
我想将所有请求从http重定向到https,并在重定向到tomcat url的主页上
这是我在myExample8080.conf中的第一条规则
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://myexample.com/$1 [R,L]
每次我以重定向循环结束。解决方案
RedirectMatch 301 ^/*$ https://myexample.com/info