Tag Archives: ssl

How to create a free SSL cert for your website

One of the most annoying things about having a website is the fact that you have to pay for an SSL cert and that its an extra it shouldnt be.

I dont need an SSL cert!
100% true this website is only a blog but googles chrome browser no will start warning about sites not having an SSL cert and seriously fuck google for that.

Create and install a Free SSL cert for your website with ZeroSSL in the following video.  Its fairly simple and quick to do.

https://www.youtube.com/watch?time_continue=117&v=GPcznB74GPs

 

CakePhp 2 Tip #11- Force SSL Connection

cake-logo

In your app Controller add;

class AppController extends AppController {

    public $components = array('Security');

    public function beforeFilter() {
        if (isset($this->params['admin'])) {
            $this->Security->blackHoleCallback = 'forceSSL';
            $this->Security->requireSecure();
        }
    }

    public function forceSSL() {
        return $this->redirect('https://' . env('SERVER_NAME') . $this->here);
    }
}

More info:
http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html