我的网址是:
http://example.com/test (base url)
我想把它变成:
https://example.com/tset
如果网址为:
http://example.com/test/login?redirect=
我将其更改为:
https://example.com/test/login?redirect=
如果我的网址是:
http://example.com/test/login
我想将其移至:
https://example.com/test/login
答案 0 :(得分:2)
您可以在网站根目录中将此规则用作非常第一规则 .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^bt\. [NC]
RewriteCond %{HTTPS} !on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
查询字符串会自动转发到https://....
网址。