XF 1.1 how to force HTTPS at .htacces xenforo

I don't have a secure cert to really test this, but this should work:

Code:
Redirect 301 / https://www.yoursite.com/

If this is in a subdirectory then it would be:

Code:
Redirect 301 /subdir https://www.yoursite.com/subdir
 
Some else that's a better with regular expressions can step up and correct me (I just don't do them that often) but I THINK this will work:

RewriteRule ^(.*/)*$ https://www.yourdomain.com/$1 [R=301,L]

I also changes the "R" at the end (redirect) to include the code 301, which is a permanent redirect. That way search engines will hit the right place the second time they try and index content.

--Ed
 
When I searched Google I found lots of people using rewrites for this. I don't like that solution. A redirect seems more appropriate. Though I had trouble finding a way to check the protocol using a redirect, hence the plain redirect in my previous post.
 
Isn't the "R=301" a redirect directive?

--Ed

Oh yeah.
stupidface.gif
 
Top Bottom