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

XF 1.5 A problem about HTTPS redirect

Discussion in 'XenForo Questions and Support' started by Umut Karademir, Mar 16, 2016.

  1. "Hello everyone. I have purchased a SSL sertificate for my forum that located at subdomain. I added SSL redirect to the .htaccess file and replaced http with https in forum page in forum options. But when I go to subdomain.mywebsite.com it's still http, not https. How can I fix this problem?"

  2. andybond

    andybond Active Member

    Check in the board options that you are using https url not the http one

    Use chrome inspector - f12 and security tab to determind if any https resources are being served.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Have you applied the certificate to the domain?

    Once you do, HTTPS should be set by the server automatically.
    If it isn't, you can add this to the end of the library/config.php file:
    $_SERVER['HTTPS'] = 'on';
  4. image.jpeg

    Yes, https is included in board options and @Brogan yes I've added that code but it's still not HTTPS.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    As posted above, that is likely due to mixed/insecure content.

    You can use the browser inspector to locate the elements.
  6. Well, SSL problem is fixed. Everything working now well but I want to redirect http to https in my subdomain forum. I find a few htaccess codes in web but none of them working. Can you guys help me on this case? @Brogan @andybond
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Something like this should work:
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    Umut Karademir likes this.
  8. I added that code today but it didn't worked, added it now, still not working. When i type the URL with https it's okay but with http or without http it isn't. @Brogan
    Last edited: Mar 16, 2016
  9. andybond

    andybond Active Member

    Where did you put the .htaccess file ? at the root of the webserver ? Or in the subdomain folder ( assuming tehre is one ?! )
  10. Gene Steinberg

    Gene Steinberg Well-Known Member

    Our forum is in a subdomain, so http://www.theparacast.com/forum. We also redirect via forum.theparacast.com.

    So should the SSL be for the subdomain or the root domain? What?
  11. andybond

    andybond Active Member

    Depends on the certificate that is purchased.
  12. Gene Steinberg

    Gene Steinberg Well-Known Member

  13. Brogan

    Brogan XenForo Moderator Staff Member

    That's a subdirectory, not a subdomain.

    The subdomain would be forum.theparacast.com.
  14. Gene Steinberg

    Gene Steinberg Well-Known Member

    So, then I should get two. One for the root domain, one for the subdomain?
  15. Brogan

    Brogan XenForo Moderator Staff Member

    Check with the certificate provider.
  16. Neal

    Neal Well-Known Member

    If the subdomain just redirects to the subfolder/root domain, just buy an SSL for the root domain.

    Try this in your XenForo .htaccess (Underneath "RewriteEngine On"):

    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^/?(.*) https://www.theparacast.com/forum/$1 [R,L]
    EDIT - Sorry, just saw it's someone else's thread and they have a subdomain... :confused:
    Last edited: Apr 6, 2016
  17. andybond

    andybond Active Member

    Easiest has to be a wildcard cert.

Share This Page