We're trying to create an application that has some pages that are
supposed be accessed via https and some http, like any normal website.
We have the following code in Application.cfm:
<cfset SSL_files =
"/contact_president.cfm,/contact_president_thanks.cfm,/contact.cfm,">
<cfset needsSecure = #ListFindNoCase(SSL_files,CGI.SCRIPT_NAME,',')#>
<cfif (needsSecure NEQ 0) AND (CGI.HTTPS EQ "off")>
<cflocation url="https://#CGI.SERVER_NAME##CGI.SCRIPT_NAME#">
<cfelseif (needsSecure EQ 0) AND (CGI.HTTPS EQ "on")>
<cflocation url="http://#CGI.SERVER_NAME##CGI.SCRIPT_NAME#">
</cfif>
(You can see this at http://www.riverwoodsrc.org/hof_help.txt if it
isn't readable here)
For some reason, this isn't working as well as I'd thought. If I turn
on the IE browser security setting to "notify when transferring between
secure and non-secure connections", the little alert box pops up like
crazy when going from, say, index.cfm (non-secure page) to contact.cfm
(which is supposed to be secure). It's like the browser is going back
and forth between secure and non-secure about 10-12 times before finally
stopping. But there are no page transitions while this is happening.
Anyone know why this is? I've looked and looked, and the logic seems
right. Maybe there's a better way to do what I'm trying to do?
Also, it should be noted that if I do a META redirect instead of a
cflocation, everything works fine, but of course, it's a little bit more
sluggish. Which makes me think that there is something going on with
the headers when using cflocation? Not sure, but I could really use the
help here.
The boss wants to leave the META redirect, since it works, but I want
the "whys" behind the problem so I can understand it better, and avoid
any similar issues in the future.
Thanks!
--
Ray Champagne - Senior Application Developer
CrystalVision Web Site Design and Internet Services
603.433.9559
www.crystalvision.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240165
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