RewriteEngine on
RewriteCond %{SERVER_PORT} !^443 [NC]
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R=301]

 

Centos+Apache站点配置SSL强制跳转443
https://befine.biz/article/7MTA46LjU4
转载请注明出处,谢谢!