RewriteEngine on
RewriteBase / #我这行是没有配置
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
指定把二级域名都跳转到证书的域名
.htaccess规则
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://bbs.vpshz.com/$1 [R,L]
---
转载请注明本文标题和链接:《HTTP页面自动跳转到HTTPS的.htaccess伪静态文件》
发表评论