0
我試圖在某些網址上強制使用ssl,在Apache FastCGI上使用以下.htaccess。但問題是,當我嘗試瀏覽http:// [hostname] /籃子時,它重定向到http:// [hostname] /index.php?/basket而不是https:// [hostname] /籃子。以下是代碼。我堅持這個請幫助在fastcgi上強制使用https codeigniter
RewriteEngine on
RewriteBase/
RewriteCond %{HTTPS} off
RewriteCond $1 (checkout|basket)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} on
RewriteCond $1 !(checkout|basket)
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]