[pmwiki-users] Getting ssl to work with the http: to https: forcing script?
Clive Shane Hetherington
cc1708 at soul-healer.com
Mon Jan 22 10:58:00 CST 2007
Hi People,
I am working with the auto convert from http: to https: cookbook script:
$ScriptUrl = str_replace('http:','https:',$ScriptUrl,1);
$PubDirUrl = str_replace('http:','https:',$PubDirUrl,1);
if ($_SERVER['SERVER_PORT'] != 443) {
if (!@$pagename) { header("Location: $ScriptUrl");
} else { Redirect($pagename); }
}
However I come up with the following errors:
Warning: Wrong parameter count for str_replace() in
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php on line 19
Warning: Wrong parameter count for str_replace() in
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php on line 20
Warning: Cannot modify header information - headers already sent by (output
started at
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php:19) in
/home/wholesou/public_html/wholesoulclients/farmtest/pmwiki.php on line 884
This is on: pmwiki-2.1.26
It enters fine with https:// without this code as soon as I do the forcing bit
it fails.
Thanks - Clive S Hetherington
More information about the pmwiki-users
mailing list