我想将http重定向到https某些特定网址,例如登录,注册
目前我使用的是吼叫.htaccess
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
将此所有页面重定向到https,但我只想重定向example.com/login
和example .com/signup
答案 0 :(得分:0)
RewriteCond %{HTTPS} =off
RewriteRule ^login https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} =off
RewriteRule ^signup https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]