Infinite Redirect Problem with SSL at Network Solutions
-
We have our bbPress forum hosted at Network Solutions [unfortunately]. When we activated SSL in bbPress, any SSL-secured page would immediately go into an infinite redirect loop to itself. After a little PHP debugging, I determined that the cause was two-fold:
1.
$_SERVER
does not exist, for some reason, at NetSol.2.
$_SERVER
always returns 80 at NetSol, even when accessing the site via https. It should return 443.This causes the two conditions in the
is_ssl()
function to fail, so the function incorrectly returnsfalse
. When the secured page redirects itself fromhttp
tohttps
, bbPress still thinks it’s an unsecured page and redirect back to itself again… and again… and again.We had no choice but to hack the core, which is bad because it will get overwritten when we upgrade bbPress.
is_ssl()
resides in/bb-includes/backpress/functions.core.php
. I added a condition to simply look at the scheme of the URI and return ‘true’ if it is ‘https’.I added this line to the first line of the function:
$uri_ssl = parse_url(bb_get_option('uri_ssl'));
Then this add’l
elseif
condition:} elseif ($uri_ssl == 'https') {
// Hack to support NetSol's questionable setup.
return true;
}
Has anyone else ever experienced this at NetSol?
- You must be logged in to reply to this topic.