Redirect HTTP to HTTPS in Cakephp3
If you are building CakePHP application and want to move all traffic to HTTPS you can follow bellow simple steps without making any change in .htaccess file Step 1. Edit AppController to make change use Cake\Event\Event; Step 2. Load security component public function initialize() { parent::initialize(); $this->loadComponent(‘Security’, [‘blackHoleCallback’ => ‘forceSSL’]); $this->loadComponent(‘RequestHandler’); $this->loadComponent(‘Flash’); $this->loadComponent(‘Cookie’); } Step […]
Continue Reading