If you want to force DT Donate to use an SSL url, then take this code and paste it into the <head> tag of your joomla template. It works for both DT Donate and DT Register. If you do not have both, that is fine.
<?php
// toggle in and out of SSL
// check the URL for modules that need SSL
if ((strpos($_SERVER["REQUEST_URI"], "com_dtregister") > 0) || (strpos($_SERVER["REQUEST_URI"], "com_dtdonate") > 0 )|| $_REQUEST['option']=='com_dtdonate' || $_REQUEST['option']=='com_dtregister')
{
// only rewrite the URL once, if you are not in https: mode
if ($_SERVER['SERVER_PORT'] == 80)
{
if($_SERVER['REQUEST_METHOD']=='POST'){
}else{
header( 'Location: https://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
}
}
}
// check to see if https: is not required
if ((strpos($_SERVER["REQUEST_URI"], "com_dtregister") === false) && (strpos($_SERVER["REQUEST_URI"], "com_dtdonate") === false) && $_REQUEST['option']!='com_dtdonate' && $_REQUEST['option']!='com_dtregister')
{
// only rewrite the URL once, if you are already in https: mode
if ($_SERVER['SERVER_PORT'] == 443)
{
if($_SERVER['REQUEST_METHOD']=='POST'){
}else{
header( 'Location: http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
}
}
}
?>
Thanks so much for posting that code! I spent all of yesterday trying to figure out how to consistently and exclusively force SSL for DT Register and DT Donate. Your code works like a charm!
This code should be inside of a PHP tag. You may need to put a <?php in front of your code. This would be why it is showing on the screen. I have just modified the code in this post to include this.
Im getting the same error. As soon as I enable the SSL plugin, firefox tells me that "this page is redirecting...in a way that will never complete"
I have to disable the SSL plugin just to use my site. In turn, that makes IE freak out and give me that "some elements on this page are insecure" message.