Skip to content
World Wide Web Server edited this page Jul 4, 2012 · 6 revisions

The Problem: You have certain pages that you want to load through SSL, but you want to continue using CodeIgniter's URL helper.

The Answer: HTTPS Routing with mod_rewrite

We're going to use mod_rewrite to specify entry and exit points for areas of our application that need SSL encryption.

An entry:

[code]RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} controller/function RewriteRule ^(.*)$ https://www.yourdomain.com/controller/function[R=301,L][/code]

Clone this wiki locally