How to redirect browser to https (ssl) in php

How to redirect the browser to https when site is using http protocal in PHP? First of all, you should know that SSL must be installed in the server. To redirect the browser to “https” , we must know that the site is using SSL or not at the moment. And for this, there is …