Redirect site url http to https in codeigniter
<p>I want to redirect my existing site to HTTPS. Currently in browser if <strong>URL</strong> start with <strong>HTTP</strong> then it will show bad gateways error but i want to redirect site to <strong>HTTPS</strong>.</p>