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

#1
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.
 

Mike

XenForo developer
Staff member
#2
You'll need to add this to your xenforodirectory .htaccess as well (just after the RewriteEngine On line).
 

Mike

XenForo developer
Staff member
#4
XenForo uses its own rewrite rules that match the URL and stop processing. You'd see this with various other applications as well.
 
Top