【发布时间】:2012-10-01 18:08:26
【问题描述】:
我想强制我网站上的每个页面都使用 SSL (https),除了主页 index.php 使用 .htccess
【问题讨论】:
我想强制我网站上的每个页面都使用 SSL (https),除了主页 index.php 使用 .htccess
【问题讨论】:
在文档根目录的 htaccess 文件中,添加以下规则:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/(index.php)?$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
【讨论】: