I have a php application in place. I'm working on installing an SSL certificate on my web host and forcing all connections during login and after login to use the certificate. How would I go about this? Do I just have a simple force SSL on the login page, and then everything after will remain on the SSL port?
if($_SERVER["HTTPS"] != "on")
{
header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
exit();
}
Will something like that on my login page force the SSL connection for the user even after login? The reason I need SSL after login is that the php application requires and handles a lot of company financial data.
If I needed the code on each page, this would screw up sending post data as the header redirect would not carry the post data a long with it.