I just installed a SSL certificate on my site, but now I'm facing a problem when I try to force all users to go through secure SSL (HTTPS) instead of HTTP. I found that the way to to it is using the code below on .htaccess
#Force SSL on entire site
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !on [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
So far, it's not working, I get a redirect loop error.
It's redirecting to the SSL URL, but not working.. without the .htaccess rule it works when i type manually https://example.com