I want to try to check if the page being loaded is being loaded via SSL or not.
I just for SSL working on my Apache 1.3 server and I wanted to insert checks at the index pages of my various apps, like phpMyAdmin, WordPress (admin), to check whether the page was accessed via an
https:// link, and if not, you could be redirected to the encrypted page.
I might add that an .htaccess directive, if one exists, would also work for me since all the sensetive files and apps are in their own folders.
I've noticed, however, that there's no such URL checking possible in PHP using the superglobals, like HTTP_* or _SERVER[], since none of those bother to prefix the URL with the protocol. Is there another way to go about it ?
Failing this, I suppose I could always make a subdomain 'admin.' that's only served by an SSL VirtualHost (that doesn't even listen on :80), right ?