SSL (HTTPS) URLs and CodeIgniter

About 6 months ago I started using CodeIgniter, a PHP framework, for coding my projects and I instantly became a fan.  It’s easy to use and molds to your project rather than requiring your project to mold to it like some other frameworks.

One problem that most CodeIgniter developers will run into eventually is the problem of handling SSL (HTTPS) URL’s.  The problem lays in the fact that with CodeIgniter we can define one base URL.  This leaves us with either “http” or “https” as the option.  So what are we to do?  Put the whole site behind SSL?  That would be redonkulous.

Luckily, I’ve found an answer for you so that you will now be able to create to base URLs.  A secure URL and a non-secure URL.  Keep in mind, these changes are done to some of the core files so you’ll need to modify files during upgrades to newer versions of CodeIgniter.

Head on over to Dream House where Mohammad has put together an answer and instructions on how to use both “http” and “https” URLs with CodeIgniter.

This entry was posted on Monday, March 30th, 2009.
You can leave a comment, or trackback from your own site.

No Comments Yet

You can be the first to comment!

Leave a comment