XF 1.5 Forcing HTTPS with .htaccess does not work with XenForo

JackieChun

Well-known member
After recently installing an SSL certificate, I enabled the following rule in .htaccess:

Code:
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Strangely, it works for everything except XenForo. So if you type in http://example.com, it properly redirects to https://example.com. Same with http://example.com/anyrandomdirectory/, it goes to https://. But if you type http://example.com/xenforodirectory/, it does not redirect to https://. This has left me quite stumped. I have no idea what could be causing this and how to troubleshoot it.
 
XenForo uses its own rewrite rules that match the URL and stop processing. You'd see this with various other applications as well.
 
Back
Top Bottom