CakePHP 2.xでSSL通信(https)を強制する方法です。 httpでのリクエストがあった場合は、httpsにしてリダイレクトさせるようにします。 .htaccessなどでリダイレクトさせる方法もありますが、今回はCakePHPの機能を使ってリダイレクトさせます。 Security Componentの読込AppController.phpでSecurity Componentを読み込みます。 // app/Controller/AppController.php public $components = array( 'Security', ); beforeFilterメソッドを変更AppControllerのbeforeFilterメソッドにhttpリクエストのときに実行するメソッド、 httpsを強制したいアクションを指定します。 // app/Controller/Ap