I'm curious. What is the best practice to auto switch the user from http://www.example.com to https://www.example.com
i.e. from http to https? Ideally I would like to make it so that no matter what the url (and any possible get data)
There are a couple things people chat about like checking $_SERVER ["SERVER_PROTOCOL"] or $_SERVER['SERVER_PORT'] or $_SERVER['HTTPS'] but I would like to know what the best practice is.