Using Apache to redirect HTTP to HTTP, if https version of the site is not configured via Apache ModSSL it doesn't set %{HTTPS} variable to "on" and keeps redirecting infinitely.
The best way to do is to send X-Forwarded-Proto header from load balancer to Apache and configure RewriteCond as follow.
If not already done enablerewrite and ssl
a2enmod rewriteThen in HTTP vhost configure
a2enmod ssl
<VirtualHost *:80>
....
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
...
</VirtualHost>
Instead of the common usage :
RewriteCond %{HTTPS} off
source : https://stackoverflow.com/a/19722706