Our server uses https, but when we want to redirect to an external site that uses http, the https still gets added on. We will often have mixed links where some links are http and some are https. Our current call goes as:
drupal_goto($link, array("external" => TRUE));//where $link is the link we want to redirect to
Is setting the https option to false the way to go, or will it kill the links that should be https? I would think for an external link that drupal would not be trying to change that.
We changed the code to this, but it did not fix the issue:
$parsed = parse_url($link);
if ($parsed["scheme"] === "http") {
$https = FALSE;
}
else {
$https = TRUE;
}
// Forward to requested URL.
drupal_goto($link, ["external" => TRUE, "https" => $https]);