我目前有一个重定向,用于将所有HTTP页面重定向到对应的http://www.和http://页面,如下所示:
# redirect all pages to https://www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# redirect http to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HT