Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想强制我网站上的每个页面都使用 SSL (https),除了主页 index.php 使用 .htccess
在文档根目录的 htaccess 文件中,添加以下规则:
RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{REQUEST_URI} !^/(index.php)?$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]