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

XF 1.2 SSL certificate not redirecting

Discussion in 'XenForo Questions and Support' started by Merlinthewiz, Jan 25, 2014.

  1. Merlinthewiz

    Merlinthewiz New Member

    I just installed an SSL certificate for my domain. Whenever I type https://websitename.com it loads the ssl certificate but I'd like for whenever I go to websitename.com to automatically go to https://websitename.com.

    What can I do to fix this so the site cannot load without the SSL certificate?

    Not too savvy so please explain as simple as possible.

    Thank you
  2. Liam W

    Liam W Well-Known Member

    You will have to setup a htaccess redirect from the non-secure to the secure page:

    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  3. Merlinthewiz

    Merlinthewiz New Member

    That didn't work for me for some reason.

    in Cpanel i did a domain redirect from the public domain to https://websitename.com/index.php and now it seems to work.

    Edit: Doesn't work whenever I click anything on the board, it just takes it back to no SSL
  4. Liam W

    Liam W Well-Known Member

    Have you set the domain to https in options?

    Mine should've worked, it works for me. Make sure it's right at the top of the htaccess file in the root of your forum directory.

    Remove the cPanel one.
  5. Merlinthewiz

    Merlinthewiz New Member

    works perfect now. I had forogtten to set the domain to https :) was still under http. oops.

    For some reason friendly URLS aren't working atm. Whenever I click a forum it gives me a 404 error
  6. Liam W

    Liam W Well-Known Member

    You do still have the rest of the xenForo htaccess in the .htaccess file right?

  7. Merlinthewiz

    Merlinthewiz New Member

    yeah I do. full friendly URLS stopped working after I upgraded to 1.2 from 1.01
  8. RoldanLT

    RoldanLT Well-Known Member

    Choose here, which code will work for you 100% :)
    Rewritecond %{https_host} ^phcorner.net [nc]
    Rewriterule ^(.*)$ https://www.phcorner.net/$1 [r=301,nc] 
    RewriteCond %{https_HOST} !^www\.phcorner\.net$
    RewriteRule (.*) https://www.phcorner.net/$1 [R=301,L] 
    RewriteCond %{https_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{https_HOST}/$1 [R=301,L] 
    RewriteCond %{https_HOST} ^phcorner.net [NC]
    RewriteRule ^(.*)$ https://www.phcorner.net/$1 [L,R=301] 
  9. Exterminator

    Exterminator Member

    And with folder domain/forum ?

Share This Page