• Resolved labsy

    (@labsy)


    Hi,

    I am using latest WP with latest Wordfence plugin with my web site, which is currently active on both, HTTPS and HTTP.

    First off, I’d like to FORCE it using HTTPS only, but that’s minor problem.

    Main problem is, that content of HTTP website is totally different of those via HTTPS. Actually, HTTP content is default/demo content of WP theme I use, while HTTPS content is what I actually wrote.
    I think this problem begun when I changed to HTTPS, but I am not sure, whether it is WP theme guilty, or Wordfence plugin.

    Any idea?

    https://www.ads-software.com/plugins/wordfence/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Wordfence should be fine with HTTP or HTTPS.

    -Brian

    Hi,

    im using version 6.0.7 and i think Wordfence has problem with HTTP vs HTTPS.
    Wordfence returns for both protocol same cached content. What is problem, because there are two different URL and need be two different cache content. Option “Allow SSL” in Performance tab is disabled. But i

    My main url is HTTP but i have available HTTPS because Google.
    I change flow how WordPress handles SITE_URL constant. In wp-confing.php add this conditionals:

    if (isSecure()) {
      define('WP_HOME',   'https://' . $web_site_url);
      define('WP_SITEURL','https://' . $web_site_url);
      header( 'X-Secure-Connection: true' );
    } else {
      define('WP_HOME',   'https://' . $web_site_url);
      define('WP_SITEURL','https://' . $web_site_url);
    }

    So when somebody (or Google crawler) use https, all my links are changed to secure.
    But if is only one version cached, it returns bad links (http in https content, so CSS and Scripts are not loaded).

    I think Falcon engine should cache HTTP and HTTPS separately but it doesn’t

    Regards!
    Radovan.

    This isn’t a standard configuration (I have never seen anyone do this before) so we wouldn’t really be able to support it. I am fairly certain there isn’t anything in the code that would allows us to do this.

    tim

    I think same override do Woocommerce when is option “Force secure checkout” is enabled, so when website uses default only HTTP version its overload WP_HOME and WP_SITEURL. Because if it dont do it, page will dont load CSS and JS files.

    If it isnt standard configuration then i dont know why WordPress has helper function is_ssl(). I think it is completely normal, because you could conditional content.

    Wordfence Basic Cache handles SSL and NON-SSL right. It saves and returns two diffrerent results. One for HTTP and for HTTPS.

    Only Falcon engine uses just one cache file. (same for HTTP and HTTPS) so when is HTTP cached first, on HTTPS version it returns this HTTP cached file with bad content (URLs are non secure for example) and it is error.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘HTTPS and HTTP different content?’ is closed to new replies.