[Plugin: WordPress HTTPS (SSL)] Barracuda load balancer redirect problem
-
If you use this plug-in behind a Barracuda load balancer with SSL certificate offloading, you will get a number of redirects before it eventually fails.
You will need to modify the is_ssl() function to look for the existence of the HTTP_FRONT_END_HTTPS server variable. It will be set to ‘On’ if the Barracuda does the SSL decryption.The code below seems to work for me. If you have another type of load balancer, the server variable may be something else. Look at
https://mydomain.com/phpinfo.php and
https://mydomain.com/phpinfo.php to see the difference in PHP variables between the SSL and non-SSL requests./**
* Checks if the current page is SSL
*
* @param none
* @return void
*/
function is_ssl() {
if ( $this->shared_ssl == 1 && strpos($this->https_url, $_SERVER[‘HTTP_X_FORWARDED_SERVER’]) !== false ) {
return true;
}if ( isset($_SERVER[‘HTTP_FRONT_END_HTTPS’]) && strtolower($_SERVER[‘HTTP_FRONT_END_HTTPS’]) == ‘on’ ) {
return true;
}return is_ssl();
}
- The topic ‘[Plugin: WordPress HTTPS (SSL)] Barracuda load balancer redirect problem’ is closed to new replies.