Force HTTPS using .htaccess – stuck in redirect loop

This is a late answer but this works for me:

Change the RewriteCond to this

RewriteCond %{HTTP:X-Forwarded-Proto} !https

Should be like this:

RewriteEngine On 
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)