CakePHP | Redirect from http to https URL

| By Webner

If you want to redirect from http to https in CakePHP, generally redirect method code is like this:

$this­->redirect(array("controller" => "myController","action" =>t; "myAction"));

But if your site is running on http protocol it will redirect to the url with http protocol:


If you want to redirect it to https url write code as:


Leave a Reply

Your email address will not be published. Required fields are marked *