WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
Barracuda load balancer redirect problem (3 posts)

  1. markwilson66
    Member
    Posted 2 years ago #

    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
    http://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();
    }

    http://wordpress.org/extend/plugins/wordpress-https/

  2. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Interesting. In the next version I've added some sorcery to use JavaScript and cookies to see if the site is serving up HTTPS if on the PHP side it thinks that the page is HTTP. It's pretty neat, really. If people still have issues after I push out the next version, I may expand on this and allow users to define custom rules for is_ssl().

    Thanks,
    Mike

  3. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    I just pushed out version 3.0 which should resolve this. Please try updating and let me know if you need any help.

    Sorry for the late response. I have not had time to support the plugin for a while now. Since I just pushed out 3.0, I'll be keeping an eye on the support forums to fix any bugs that arise.

    Thanks,
    Mike

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic