2
我想迫使我的網站上的每一頁,使用SSL(HTTPS),除了主頁的index.php文檔中使用.htccess強制SSL,除非是在主頁上的index.php使用.htccess
我想迫使我的網站上的每一頁,使用SSL(HTTPS),除了主頁的index.php文檔中使用.htccess強制SSL,除非是在主頁上的index.php使用.htccess
在htaccess文件根,添加這些規則:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/(index.php)?$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]