[eluser]rossmurphy[/eluser]
thanks guys, some great and elegant solutions in that other thread.
Think im going to create a force_ssl() helper and redirect, but will also investigate routing and see if i can't improve on this. Will post results.
Here is the helper function from the other thread though...
Code:
if ( ! function_exists('force_ssl'))
{
function force_ssl()
{
$CI =& get_instance();
$CI->config->config['base_url'] = str_replace('http://', 'https://', $CI->config->config['base_url']);
if ($_SERVER['SERVER_PORT'] != 443)
{
redirect($CI->uri->uri_string());
}
}
}