.htaccess Configuration
#1
Hi Team,

This is my first foray into myBB and I really want this to be a great experience for my users and secure as possible.  I'm following the series of items found at myBB Security and I have a question surrounding the .httaccess file and security settings.  Under the Apache servers settings, I see that it is recommended these following setting:

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Mine are set as:

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L]



It's confusing that the recommendation is HTTPS !=on or is that "!" commenting the "on" out so that it is really off?  See my dilemma? Shy

As well, what exactly does [L,R=301] doing?

My first post so I'm looking forward to the help.  Thanks folks!

The Cap'n
Reply
#2
The !=on means 'does not equal on'. So 'off'.

The !=on is considered more future-proof, so I believe you're good.
Reply
#3
(2025-08-02, 04:58 PM)CapnKirk Wrote: As well, what exactly does [L,R=301] doing?
The "L" stands for "Last" (don't treat any other rule after this is done)
The "R=301" stands for "Redirect with 301 code", 301 means permanent redirection. This will make search engines learn they don't have to go on the http but on the https
Tchat en français
Do not ask me help through PM or Discord

Reply
#4
(2025-08-03, 12:03 PM)Crazycat Wrote:
(2025-08-02, 04:58 PM)CapnKirk Wrote: As well, what exactly does [L,R=301] doing?
The "L" stands for "Last" (don't treat any other rule after this is done)
The "R=301" stands for "Redirect with 301 code", 301 means permanent redirection. This will make search engines learn they don't have to go on the http but on the https

Thanks so much!!  Implemented last night and, so far, happy!  I've been going through each and every security setting to make sure this board is a secure as possible.  Much appreciated the feedback!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)