RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
如果您正在运行nginx,请转至:
Admin Level -> Custom Httpd Config -> domain.com
并在令牌| CUSTOM4 |中添加:
|*if SSL_TEMPLATE="0"|
return 301 https://$host$request_uri;
|*endif|








