Forums

Secure and Non-Secure Items

deafbiz 08 Jan, 2012
Need an update code for v4 and Joomla 1.7.
I only have one page that needs https:// to submit a form.
The old code in the template's index.php is no longer valid:
<?php
if ( ($option == 'com_chronocontact' )
&&($_GET['chronoformname'] == 'Donation' )
&& ( strpos("x".$mosConfig_live_site,"http://" ) )
&& ( $_SERVER["SERVER_PORT"] != "443" ) ) {
$mosConfig_live_site2 = str_replace("http://", "https://",
$mosConfig_live_site);
mosRedirect($mosConfig_live_site2.'/index.php' .'?'.$_SERVER['QUERY_STRING']);
} elseif ( ( $option != 'com_chronocontact' )
&& ( $_SERVER["SERVER_PORT"] == "443" ) ) {
$mosConfig_live_site2 = str_replace("https://", "http://",
$mosConfig_live_site);
mosRedirect($mosConfig_live_site2.'/index.php' .'?'.$_SERVER['QUERY_STRING']);
}
?>

Thanks for the assistance.
GreyHead 09 Jan, 2012
Hi deafbiz,

That looks like it is mostly Joomla! 1.0 code.

As far as I know ChronoForms v4 should automatically pick up the https:// from the page URL

Bob
deafbiz 09 Jan, 2012
I've removed the code from the template.
Since the form is not part of the menu but a link within another article, if I put in https:// that form becomes secure.
However if someone didn't fill out the form but hit the back button, then the rest of the website is stuck at https://
How is that resolved?

Come to think of it, I'm going to experiment if this problem goes away if I created a menu for this form and secure it.

Update: I set the link up in a way that it opens into a new window with SSL, and leaves the rest of the website alone. I'll be testing the form to see if email delivery works. I hope this idea helps others.
This topic is locked and no more replies can be posted.