XF 1.5 Xenforo SSL - I have both HTTP and HTTPS how to force only HTTPS?

Pavle123

Active member
Hi,

Just set up my second XF forum. (Yeey!)

This one is https. When installing I added https in the appropriate section and https works well. However when I enter http://myforum.com there is http version as well.

How do I redirect users to https, I do not want to have separate https and http.

When I tried http on the xenforo community forum, I was redirected to https, so that's what I would like to achieve as well.

Thanks in advance.

EDIT : Here's a link to my forum
 

Dadparvar

Well-known member
in .htaccess find:
Code:
RewriteEngine On
below it, add this:
Code:
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yoursite.com/$1 [R,L]
 

Pavle123

Active member
Thanks @Dadparvar but that did not work out for me.

I just installed XF and I have to htaccess files
htaccess.jpg
added it in htaccess not htaccess.txt, is that right?

Also in yoursite.com do I add mysite.com or mysite.com/forums? Tried both nothing worked though, cleared cache.

Here's how my file looks
2016-11-15_13-37-24.jpg

Perhaps @Brogan or @Mike can chime in?

EDIT : SOLVED.

Added the code on top right below
RewriteEngine On

Thanks a lot!
 
Last edited:
Top