I have added my website to Cloudflare for use of flexible SSL. Everything on static content is ok. For example, I can access my files directly with https (Ex: https://www.samanik.com/logo.png
).
but I can't access the WordPress site. I have changed both the site_url and home_url in the db. I have added codes to .htaccess, but when I type my website without https it redirects to https (as I want). But, nothing is shown there. I get an error called ERR_TOO_MANY_REDIRECTS
I don't know how to fix this problem.
Here is my .htaccess content.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Can anyone help me?