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


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

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


XenForo developer
Staff member
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.
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