XF 1.2 SSL certificate not redirecting

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
 
You will have to setup a htaccess redirect from the non-secure to the secure page:

Code:
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
 
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

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.
 
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
 
Choose here, which code will work for you 100% :)
1st
Code:
Rewritecond %{https_host} ^phcorner.net [nc]
Rewriterule ^(.*)$ https://www.phcorner.net/$1 [r=301,nc]
2nd
PHP:
RewriteCond %{https_HOST} !^www\.phcorner\.net$
RewriteRule (.*) https://www.phcorner.net/$1 [R=301,L]
3rd
Code:
RewriteCond %{https_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{https_HOST}/$1 [R=301,L]
4th
PHP:
RewriteCond %{https_HOST} ^phcorner.net [NC]
RewriteRule ^(.*)$ https://www.phcorner.net/$1 [L,R=301]
 
Back
Top Bottom