centos下配置Apache的https強制跳轉

vim /etc/httpd/conf/httpd.confvim

新增以下三行rest

RewriteEngine onit

RewriteCond  %{HTTPS} !=onservice

RewriteRule  ^(.*) https://%{SERVER_NAME}$1 [L,R]im

 

重啓Apache便可vi

systemctl restart  httpd.serviceco

相關文章
相關標籤/搜索