DM Force SSL for Expression Engine 2

Current version: 1.0. Released: 2010-08-06

For servers with an SSL certificate - this plugin allows you to control whether or not your templates display under https.

A template tag is also available to ensure EE generated forms submit to SSL where required. The plugin works by redirecting from the http version of the page to https.

Contents

Download

dm_force_ssl_1.0.zip

Installation & Configuration

System requirements

EE2.1, PHP5 and an installed SSL certificate

Installing

Place the folder dm_force_ssl in your /system/expressionengine/third_party/ folder

Then, add a variable to your /system/expressionengine/config/config.php file:

$config['force_ssl'] = true; 

Set this to false to disable to plugin whilst leaving tags in place (for use in non-ssl development environments etc)

Template tags

The following tags are available and should be placed at the very top of your templates.

Force tag

This tag is used to force a tempalte to display under SSL.

The built-in redirect() function is used to adjust a page if it is not already under SSL

Example

{exp:dm_force_ssl:force persist_flashdata="feedback"}

Parameters

persist_flashdata=

persist_flashdata="var1,var"

A comma-separated list of Flashdata variables to persist across the redirect

Unforce tag

Identical to above, except forces a page to not use SSL. Useful if your navigation is not absolute as it allows an escape from server-hungry SSL requests.

Example

{exp:dm_force_ssl:unforce}

There are no parameters or variables with this tag

Form paths tag

This is useful if you need to ensure that any absolute form action paths generated by subsequent {exp} tags (for example Search) retain any current https protocol. No redirect is made, but the core system variables are adjusted.

Example

{exp:dm_force_ssl:form_paths}

There are no parameters or variables with this tag

State of the project

Force SSL was written for a specific requirement. No further development is anticipated.