Apache rewrite condition to check whether request scheme is http or https is not working. I am running apache server behind loadbalancer(which is nginx server - ssl certificate is installed in loadbalancer). Mod_Rewrite variable %{HTTPS} is always comming as off for https request.
RewriteCond %{HTTPS} =on
But In servlet-container I am able to get request scheme which is also running behind same offloader.
Please let me know how to check wheather a request is http or https in apache and why ${HTTPS} is off in the above case.
Apacher Server Version: Apache/2.2.17 (Unix)