1. 程式人生 > >Apache 配置 http 轉 https

Apache 配置 http 轉 https

apache 配置 bsp iter ont pre write tee In ase

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{SERVER_PORT} !^443$
  RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
  
  RewriteEngine On
  RewriteCond %{HTTP_HOST} www.wqj17.cn [NC]
  RewriteRule ^(.*)$ http://wqj17.cn/$1 [L,R=301]
</IfModule>

Apache 配置 http 轉 https