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

XF 2.0 Config variable ${HTTPS} is not defined [.htaccess] [ssl]

#1
Hi

Following this guide: https://xenforo.com/community/resources/how-to-implement-ssl-to-secure-http-traffic-https.5425/
i configured my https redirects for a new domain

This guide said to put this to .htaccess

Code:
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
After that, my xenforo started getting slower. So, i checked the error logs and saw a tons of error saying "[core:warn] [pid 809] AH00111: Config variable ${HTTPS} is not defined"
I think that my problem of big loading is this (sometimes like 20 seconds).

My actual .htaccess is this.
I added another line for redirecting www to non www (copy pasted from stackoverflow), and then, redirect http to https (copy pasted from this forum)


(i dont know if that is well defined, i spend a lot of time dealing with redirects and now it's again wrongly configured :/ )

Anyways this works "well": if i try to connect with http it redirects me to https. And if y try to connect with www it redirects to non www.

But something is wrong with that variable %{HTTPS} that is slowing my website.

The log says that is not defined, how i can define that thing?

Im using debian.

Thanks for help
 

Mike

XenForo developer
Staff member
#2
Given that you've tagged this with 2.0, make sure your board URL is set correctly in XF and then enable the "Enable board URL canonicalization" option. You don't need anything in the .htaccess file.
 
#3
Oh, didn't know that, now it's working well.
But my forum is still slowing, with the difference that now there is not errors in error.log to know what is happening :(

Anyways, thanks for your help Mike. Now i will burn my head thinking what is slowing my xenforo