Apache自动跳转到HTTPS |
网站根目录新建.htaccess。 写入以下内容: 1. RewriteEngine On 2. RewriteCond %{SERVER_PORT} 80 3. RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L] 1. RewriteEngine On 2. RewriteCond %{SERVER_PORT} 80 3. RewriteCond %{HTTP_HOST} ^zzyundemo.com [NC,OR] 4. RewriteCond %{HTTP_HOST} ^www.zzyundemo.com [NC] 5. RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
|