1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 SSL/HTTPS content blocked

Discussion in 'XenForo Questions and Support' started by Overflame, Jun 9, 2015.

  1. Overflame

    Overflame New Member

    Hello, I want to use HTTPS connection for my forum but when I try visit it in HTTPS is showing (image attached), the HTTP is loading without problems.
    I tried put the "HTTPS" in "Board URL" from xenforo admin panel>Options>Basic Board Informations, but still had same error, when I go to mydomain.com is going to "http" not "https"

    I'm using cloudflare, flexible SSL (no certificate needed)
     

    Attached Files:

    • 1.png
      1.png
      File size:
      365.8 KB
      Views:
      14
    Last edited: Jun 9, 2015
  2. Mike

    Mike XenForo Developer Staff Member

    This is likely happening because your site isn't actually being loaded over SSL. Specifically, you hit CloudFlare over SSL, but they don't load your site over SSL.

    The simplest workaround is to put this in your config.php:
    Code:
    $_SERVER['HTTPS'] = 'on';
    That will potentially interfere if your site is accessed outside of HTTPS via CloudFlare, so bear that in mind.
     
    rafass and Overflame like this.
  3. Overflame

    Overflame New Member

    Thank you so much, now works, but I have a small problem, how can I redirect everybody to https://www.mydomain.com when is typing only mydomain.com in navigation bar? at the moment is redirecting to http.
    EDIT: Also, I tried posting an article but is not working properly (not showing area where I put content)
     
    Last edited: Jun 9, 2015
  4. Mike

    Mike XenForo Developer Staff Member

  5. rafass

    rafass Well-Known Member

    Code:
    $_SERVER['HTTPS'] = 'on';
    This small code in my config.php have fixed my issue yesterday with Cloudflare.
    Now everything is working perfect.
    Many Thanks Mike!
     

Share This Page