Title: [Plugin: WordPress HTTPS (SSL)] Modified for CloudFlare
Last modified: August 20, 2016

---

# [Plugin: WordPress HTTPS (SSL)] Modified for CloudFlare

 *  [Spencer](https://wordpress.org/support/users/boostwebsales/)
 * (@boostwebsales)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/)
 * Hi, I modded a function in your plugin to work with CloudFlares SSL, so you might
   consider including this functionality in future releases.. (Credit goes to Gravity
   Forms for a snippet of code here)
 * Here you go:
 *  public function is_ssl() {
    $https_url = parse_url($this->https_url); // Some
   extra checks for proxies and Shared SSL if ( is_ssl() && strpos($_SERVER[‘HTTP_HOST’],
   $https_url[‘host’]) === false && $_SERVER[‘SERVER_ADDR’] != $_SERVER[‘HTTP_HOST’]){
   return false; } else if ( isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && strtolower(
   $_SERVER[‘HTTP_X_FORWARDED_PROTO’]) == ‘https’ ) { return true; } else if ( $
   this->diff_host && !is_ssl() && isset($_SERVER[‘HTTP_X_FORWARDED_SERVER’]) &&
   strpos($this->https_url, ‘[https://&#8217](https://&#8217); . $_SERVER[‘HTTP_X_FORWARDED_SERVER’])!
   == false ) { return true; } elseif ( isset($_SERVER[“HTTP_CF_VISITOR”]) && strpos(
   $_SERVER[“HTTP_CF_VISITOR”], “https”)){ return true; } else if ( $this->diff_host&&!
   is_ssl() && strpos($_SERVER[‘HTTP_HOST’], $https_url[‘host’]) !== false && (!
   $this->ssl_port || $_SERVER[‘SERVER_PORT’] == $this->ssl_port) && (isset($https_url[‘
   path’]) && !$https_url[‘path’] || strpos($_SERVER[‘REQUEST_URI’], $https_url[‘
   path’]) !== false) ) { return true; } return is_ssl(); }
 * [http://wordpress.org/extend/plugins/wordpress-https/](http://wordpress.org/extend/plugins/wordpress-https/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [AngieP](https://wordpress.org/support/users/angiep/)
 * (@angiep)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661835)
 * Greetings,
 * We would be very interested in seeing this implemented.
    Lets hope Mvied will
   come out with the new version of this great plugin!
 * Angie
    [http://angiesdiary.com/](http://angiesdiary.com/)
 *  Plugin Author [mvied](https://wordpress.org/support/users/mvied/)
 * (@mvied)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661960)
 * I just pushed out version 3.0 which may or may not fix this. I ended up taking
   a more generic route for detecting proxies. 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
 *  [AngieP](https://wordpress.org/support/users/angiep/)
 * (@angiep)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661961)
 * Thank you for the update, Mike!
 * We shall certainly give it a try. Any idea when (and where) it will be available
   for us, mere mortals? Or should we just wait until WordPress will inform us of
   your updated version?
 * Warm wishes,
    Angie
 * [http://angiesdiary.com/](http://angiesdiary.com/)
 *  Plugin Author [mvied](https://wordpress.org/support/users/mvied/)
 * (@mvied)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661962)
 * Hey Angie,
 * I actually pushed it out last night (hence the previous post) but realized that
   I hadn’t tested in PHP 5.2.4 and it was broken! If you’re using PHP 5.3+, you
   can grab a copy under [Other Versions](http://wordpress.org/extend/plugins/wordpress-https/download/).
   Just look for the link to 3.0. After work I’ll be working on fixes and will hopefully
   push it out again.
 * Thanks,
    Mike
 *  Plugin Author [mvied](https://wordpress.org/support/users/mvied/)
 * (@mvied)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661970)
 * Does the most current version of the plugin work with CloudFlare?
 *  [AngieP](https://wordpress.org/support/users/angiep/)
 * (@angiep)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661971)
 * Hello Mike,
 * Thanks for asking, I know you’ve been very busy!
    Unfortunately I’m again getting
   endless loops (as opposed to pages being redirected to the homepage, in the previous
   version). This does not mean that your plugin is the culprit.
 * Tomorrow we are X-raying our database, with a top-level WP engineer. I’m sure
   that after that session I’ll have a clearer idea and be able to give you more
   professional feedback.
 * Your help is great and much appreciated,
    X Angie
 *  Plugin Author [mvied](https://wordpress.org/support/users/mvied/)
 * (@mvied)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661972)
 * Hey Angie,
 * I recently found out that Better WP Security is copying some of the functionality
   my plugin provides, so I’ve had issues with it interfering. That’s the only plugin
   incompatibility I know about.
 * If you have any questions about the plugin, let me know.
 * Thanks,
    Mike
 *  [AngieP](https://wordpress.org/support/users/angiep/)
 * (@angiep)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661973)
 * Hi Mike,
 * We do not use Better WP Security.
    I’ll report tomorrow about our findings on
   the database settings (wp_options mainly). The key to our issue might be there.
 * Thanks again.
 * Cheers,
    Angie
 *  [marhgil](https://wordpress.org/support/users/marhgil/)
 * (@marhgil)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661979)
 * FYI, Here’s how I was able to setup Cloudflare’s Flexible SSL and WordPress HTTPS
   plugin properly. No infinite redirect loop errors anymore.
 * [http://www.macuha.com/2012/05/wordpress/how-to-setup-ssl-on-wordpress-admin-using-cloudflare-flexible-ssl/](http://www.macuha.com/2012/05/wordpress/how-to-setup-ssl-on-wordpress-admin-using-cloudflare-flexible-ssl/)
 * Hope this helps.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: WordPress HTTPS (SSL)] Modified for CloudFlare’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-https_bec2c9.svg)
 * [WordPress HTTPS (SSL)](https://wordpress.org/plugins/wordpress-https/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-https/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-https/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-https/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-https/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-https/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [marhgil](https://wordpress.org/support/users/marhgil/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-https-ssl-modified-for-cloudflare/#post-2661979)
 * Status: not resolved