I have setup a test website in order to play around setting up SSL. The website is setup on a Windows host with Apache 2.2.20 with OpenSSL 0.9.8r, MySQL 5.5.37, PHP 5.3.28. The URL to the home page of the website is http://example.com/index.php. Once you get to the index.php page, you are instantly redirected to http://example.com/login.php.
I setup SSL with a self-signed cert. When I navigated to index.php on https, I get the error stating the certificate does not match the server. I click on "Continue to this website (not recommended)." I receive the message "You are about to view pages over a secure connection." I select ok, and I immediately receive the message "You are about to leave a secure Internet connection." I select yes I want to continue. IE errors out and states "Internet Explorer cannot display the webpage."
If I navigate directly to login.php on https, it works as expected.
My question is... What would be causing Apache to start loading secure and then switching to unsecure?