Force SSL in Coldfusion
Have you ever wanted to force SSL on page in coldfusion? Well, it is quite simple. Just add the following code to the top of the page you want SSL on.
<cfif CGI.https is "Off">
<cflocation url="https://#cgi.server_name##cgi.script_name#?#cgi.query_string#" addtoken="no" />
</cfif>
<cflocation url="https://#cgi.server_name##cgi.script_name#?#cgi.query_string#" addtoken="no" />
</cfif>
Bam, all set!



There are no comments for this entry.
[Add Comment]