mod_rewrite loop, redirecting http to https on certain section of wordpress blog

I am by no means a mod_rewrite expert but would something like this work?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# Force HTTPS for /cart/
RewriteCond %{HTTPS} !=on
RewriteCond %{THE_REQUEST} ^[A-Z]+\s/cart [NC]
RewriteRule ^(cart) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]

# Force HTTPS for /my-account/
RewriteCond %{HTTPS} !=on
RewriteCond %{THE_REQUEST} ^[A-Z]+\s/my-account [NC]
RewriteRule ^(my-account) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]

# Force HTTPS for /checkout/
RewriteCond %{HTTPS} !=on
RewriteCond %{THE_REQUEST} ^[A-Z]+\s/checkout [NC]
RewriteRule ^(checkout) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]

# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

</IfModule>

# END WordPress

I’m sure the 3 separate statements could be combined somehow, but like I said I’m no expert. Let me know if this functions properly for you though.

error code: 523