14
htaccess重定向到https:// www
我有以下htaccess代码: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond !{HTTPS} off RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> 我希望https://www.使用HTTPS 将我的站点重定向到该站点,并强制执行该www.子域,但是当我访问http://www.(不使用HTTPS)时,它不会将我重定向到https://www使用HTTPS。