linux apache 服务器 已经配置了ssl ,http 怎么直接跳转到https
1.去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#号
2、找到
大约232 行、
添加
-
# 新增
-
RewriteEngine on
-
RewriteCond %{SERVER_PORT} !^443$
-
RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
重启