启用强制https访问

为了从http跳转到https网址,在本站点根目录的.htaccess中增加一条转向规则:
RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

位置在
RewriteEngine On
之后。

参考资料

Author

Semprathlon / Simfae Dean

Posted on

12/29/2015

Updated on

07/19/2023

Licensed under

Comments