Title: Problem with CLOUDFLARE Definition
Last modified: January 16, 2020

---

# Problem with CLOUDFLARE Definition

 *  Resolved [ymnik13](https://wordpress.org/support/users/ymnik13/)
 * (@ymnik13)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problem-with-cloudflare-definition/)
 * Hi.
    I use your plugin. The domain is registered on CloudFlier. But the plugin
   does not correctly define it and cannot add lines to .htaccess
 *     ```
       RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
       RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L]
       ```
   
 * Looked at the code in the file:
    **wp-content/plugins/really-simple-ssl/class-
   admin.php : 1299** `elseif ((strpos($filecontents, "#CLOUDFLARE#") !== false)
   || (isset($_SERVER['HTTP_CF_VISITOR']) && ($_SERVER['HTTP_CF_VISITOR'] == 'https'))){`
 * but this field (‘HTTP_CF_VISITOR’) in fact gives json
    `[HTTP_CF_VISITOR] => {\"
   scheme\":\"https\"}`
 * The same situation in:
    **wp-content/plugins/really-simple-ssl/ssl-test-page.
   php : 38** `if (!empty($_SERVER['HTTP_CF_VISITOR']) && ($_SERVER['HTTP_CF_VISITOR']
   == 'https')) {`
 * Maybe my server is not configured correctly and ‘HTTP_CF_VISITOR’ should be a
   string and not json.
 * Could you add regex validation for this case?
    -  This topic was modified 6 years, 4 months ago by [ymnik13](https://wordpress.org/support/users/ymnik13/).

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

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problem-with-cloudflare-definition/#post-12333133)
 * I think you are right!
 * I noticed that in the wp-config.php, it was checked like this:
    strpos($_SERVER[“
   HTTP_X_FORWARDED_SSL”], “on”) !== false
 * which will work fine with the json as well. But in the lines you showed it is
   checked with an exact match, which won’t work in that situation. Weird I haven’t
   heard anybody about this before!
 * Can you check if this branche works for you?
    [https://github.com/rlankhorst/really-simple-ssl/tree/CloudFlare-Fix](https://github.com/rlankhorst/really-simple-ssl/tree/CloudFlare-Fix)
 * It includes this fix, which should make those tests work.
 *  Thread Starter [ymnik13](https://wordpress.org/support/users/ymnik13/)
 * (@ymnik13)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problem-with-cloudflare-definition/#post-12334139)
 * Super.
    Everything works.
 * I hope that in the near future, these edits will go to release
 * Thank you. Your plugin, very makes life easy 🙂
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problem-with-cloudflare-definition/#post-12335826)
 * [@ymnik13](https://wordpress.org/support/users/ymnik13/), thanks for confirming!
   We will release this with the update next week.

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

The topic ‘Problem with CLOUDFLARE Definition’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/problem-with-cloudflare-definition/#post-12335826)
 * Status: resolved