Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Setting up DT Register with SSL

Setting up DT Register with SSL 10 years 5 months ago #3707

  • dthadmin
  • dthadmin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
Jessica - if you\'re talking about getting this message:
\"This page contains both secure and nonsecure items. Do you want to display the nonsecure items?\"

...this is an IE-related issue. You must have items in your template, other modules, etc that are pulling graphics, css, etc with absolute urls instead of related ones.
The topic has been locked.

Setting up DT Register with SSL 10 years 4 months ago #3864

  • c121mark
  • c121mark's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Hello,

I am also using Virtuemart on my site. When I apply the hack to switch back and forth from the SSL it breaks Virtuemart. When I go to checkout in Virtuemart I get redirected back to the home page. Is there a way to include virtuemart in this hack? I am not a coder but I can tinker a little bit.

Thanks!
The topic has been locked.

Setting up DT Register with SSL 10 years 4 months ago #3891

  • dthadmin
  • dthadmin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
This code doesn't go at the VERY top of the index.php file, but in your template's index.php file, add this code in the <head> area. You should have some lines of code that start with META (maybe lowercase)... after the meta code, paste in this SSL code.

c121mark - you can try adding

&& ($_REQUEST["option"] != "com_virtuemart")

after the same code for com_dtregister.
The topic has been locked.

Setting up DT Register with SSL 10 years 4 months ago #3960

  • troynwc
  • troynwc's Avatar
  • Visitor
  • Visitor
this is worked great for me and dtdonate. Thank you.
The topic has been locked.

Setting up DT Register with SSL 10 years 4 months ago #3977

  • dthadmin
  • dthadmin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
To use this code in combo with DT Register, DT Donate and Virtuemart... use this modified version...
<?php

// toggle in and out of SSL
// check the URL for modules that need SSL

if ((strpos($_SERVER["REQUEST_URI"], "com_virtuemart") > 0) || (strpos($_SERVER["REQUEST_URI"], "com_dtregister") > 0) || (strpos($_SERVER["REQUEST_URI"], "com_dtdonate") > 0 )|| $_REQUEST['option']=='com_dtdonate' || $_REQUEST['option']=='com_dtregister' || $_REQUEST['option']=='com_virtuemart')
{
// 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_virtuemart") === false) && (strpos($_SERVER["REQUEST_URI"], "com_dtregister") === false) && (strpos($_SERVER["REQUEST_URI"], "com_dtdonate") === false) && $_REQUEST['option']!='com_dtdonate' && $_REQUEST['option']!='com_dtregister' && $_REQUEST['option']!='com_virtuemart')
{
// 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"]);
}
}
}
?>
The topic has been locked.

Setting up DT Register with SSL 9 years 5 months ago #6473

  • dthadmin
  • dthadmin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
UPDATE - as of version 2.6.2, there is a new SSL plugin that comes with the DT Register package. You can install and enable this plugin then none of the code shown in this forum thread will need added to your template. Just install and enable the plugin!

UNLESS... you are using other components in addition to DT Register that also require secure https urls. Then you'll need to use the code above and modify it to allow use of your other components... like Virtuemart, DT Donate, etc. If using this code, do NOT also use the DT Reg SSL plugin.
The topic has been locked.
  • Page:
  • 1
  • 2
Time to create page: 0.099 seconds