• 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

Liam W

Well-known member
#2
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]
 

Liam W

Well-known member
#4
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.
 
#5
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
 

Liam W

Well-known member
#6
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
You do still have the rest of the xenForo htaccess in the .htaccess file right?

Liam
 

RoldanLT

Well-known member
#8
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]