XF 2.0 .htaccess no longer used?

BenProPlayz

Member
Hello xenForo community,

I was wondering if the .htaccess file is not longer being used in xenForo. I ask this because I have tried to enter multiple different things into the .htaccess and none have worked. I have been trying to force SSL, force a "/" at the end of the web directory in the URL bar, and force php, and html not to show up in the URL bar. I know the last one can be done with friendly URLs so I am not to worried about that one, however the one I really want to do is force SSL. Any and all help is appreciated.

Best Regards
BenProPlayz
 
Hello ozzy47,

Yes I am certain it is. There is also a htaccess.txt but I very much doubt that is the one I should be using. If it changes anything the .htaccess is a hidden file.

Best Reagrds,
BenProPlayz
 
Hi Chris D,

Thank you very much! You have fixed my SSL issue, however I still need to redirect threads to other urls and I need .htaccess for that.

Best Regards
BenProPlayz
 
Hello ozzy47,

I would be adding this into my .htaccess:
Code:
RewriteEngine On
        RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
        RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Best Regards
BenProPlayz
 
As Brogan asked.... what HTTP server are you on. XenForo itself does not use the .htaccess, only the appropriate HTTP server does.
LiteSpeed and Apache use .htaccess
OpenLiteSpeed and nginx do NOT use .htaccess.

EDIT:
OK, looks like your site is on Apache as the HTTP server so the .htaccess should work.
 
Top Bottom