Using SSL is a huge topic, as is online security in general; therefore, I strongly recommend you read widely about web security (because this recipe isn't really a security primer). However, if you specifically wish to protect certain pages with an SSL certificate, there is an easy way to do it. We can create a CodeIgniter helper file to toggle SSL support on or off. Let's see how to do it.
I'm sure you know of the benefits of requiring certain pages in a website to be protected with an SSL certificate. The sight of that green address bar and little padlock can go a long way in allaying a user's concerns with entering data in a website. CodeIgniter doesn't come with SSL support built-in; however, it is perfectly easy to implement using a simple helper. Obviously, SSL support isn't the be-all and end-all of website security, and should always be implemented alongside other security measures to mitigate against unwanted visitors.