CakePHP | Redirect from http to https URL

Author - Kailash

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:

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published.