0

I have the following redirect rule defined in my .htaccess file:

RewriteCond %{HTTPS} off [OR]  
RewriteCond %{HTTP_HOST} ^example\.com*  
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]  

When I try to use CloudFlare with my site, I get a redirect loop error (in my browser). Is there a way to modify the rules above to be compatible with CloudFlare?

The example at https://stackoverflow.com/a/34866168/2521519 looks like it's what I need but it doesn't seem to redirect to the www version of the url.

Community
  • 1
  • 1
Roland
  • 11
  • 2
  • Possible duplicate of [How do I force HTTPS (Cloudflare Flexible SSL)?](http://stackoverflow.com/questions/34866066/how-do-i-force-https-cloudflare-flexible-ssl) – Croises Jan 20 '16 at 07:29

1 Answers1

0

This issue was solved by changing SSL to "Strict" in the "Crypto" section of my CloudFlare settings. My understanding is that this is the correct setting for sites that already have an ssl certificate installed.

Roland
  • 11
  • 2