2014-11-06

How to enable ssl/https in zend framework 1

Add this to application/Bootstrap.php:
protected function _initForceSSL() {
    if($_SERVER['SERVER_PORT'] != '443') {
        header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
        exit();
    }
}

No comments:

Post a Comment