When working behind a load balancer that is handling the https encryption and then making non-ssl calls to Apache, checking for {HTTPS} isn't sufficient. Even when setting an environment HTTPS variable to get php recognizing the request as HTTPS, it is still not going to be available in .htaccess. (However you could check for {ENV:HTTPS} )
Looking around, it looks like there is a standard header that CAN be set (but is not always configured) by the load balancer when it makes the proxy request, X-FORWARDED-PROTO. I think it would make sense to add that check to the default .htaccess rules for boost.
# Custom: Test for X-Forwarded-Proto in request headers from a load balancer.
RewriteCond %{HTTP:X-Forwarded-Proto} https
Comments
Comment #1
mgiffordComment #2
mgiffordAdding Core link & also this blog:
http://www.metaltoad.com/blog/running-drupal-secure-pages-behind-proxy