apahce 设置强转https

 

在VirtualHost 模块下添加如下配置

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

posted @ 2022-03-30 15:51  45645+56  阅读(37)  评论(0)    收藏  举报