I am trying to force ssl on certain urls using the following .htaccess on apache FastCGI. But the problem is when I try to browse http://[hostname]/basket it redirects to http://[hostname]/index.php?/basket instead of https://[hostname]/basket. Below is the code. I am stuck with this please help
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]