从.htaccess
我无法检测到是否https
。
我只需要,如果我点击:
- “ http://www.example.com ”--转到-->“ http://www.pure-site.com ”
- " https://www.example.com " --转到--> " https://www.secure-site.com "
在我的.htaccess
:
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://www.secure-site.com [R=301,L,NS]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://www.pure-site.com [R=301,L,NS]
但它永远无法检测 RewriteCond %{HTTPS} on
到。
我在负载平衡的 AWS/EC2 实例上。