The problem that I am having has to do with the need to keep some urls of a website protected by https and the rest kicked to http.
Normally, you have $_SERVER['HTTP_HTTPS'] or $_SERVER['HTTPS'] (depending on your flavor of Apache). You also can check the port - it's 80 for normal traffic and 443 for https.
My problem is that the certificate sits on the loadbalancer, and all these variables are unavailable, and the webserver sees http://www.foo.com on port 80. One way to fix this is to tell the loadbalancer to sent the traffic on a different port, but I wonder if there are other ways to detect https coming from the load balancer...