You'll probably also want to append the query_string (url variables).

<cfif cgi.server_port neq 443>
  <cfset redir = "https://"; & cgi.http_host & cgi.path_info>
  <cfif Len(cgi.query_string)>
    <cfset redir = redir & "?" & cgi.query_string>
  </cfif>
  <cflocation url="#redir#">
</cfif>


----- Original Message ----- 
From: "Patricia Lee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 23, 2004 11:10 PM
Subject: Re: Force use of HTTPS


> Would this help?
>
> <cfif cgi.SERVER_PORT NEQ "443">
>  <cfset redir = 'Https://' & HTTP_HOST & PATH_INFO>
>  <cflocation url="#redir#" addtoken="No">
> </cfif>
>
>> Hi again - how do I force hte use of HTTPS pages ? I can force the flow 
>> of
>> pages with <cflocation> tags, but I want to stop a user just typing in 
>> the
>> URL as HTTP ? Thanks
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185281
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to