https problems

I’m using the following code in my htaccess file:

# non-www to https://www.
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

#PBC - http: traffic to https: 
RewriteCond %{HTTPS} off
RewriteRule ^{REQUEST_URI} [L,R=301]

to redirect as needed the following URL forms:

The goal (proper form) is, in as few redirects as possible.

All works well in Chrome (windows 10).
Website “301 checkers” state that the redirect directives work fine.

However, I encounter a problem with
when I use FireFox or Microsoft Edge (windows 10, desktop) or android mobile browsers Chrome and Dolphin.

With them I get a “non-secure” (broken https) notification.
In the Address Bar of the browser it shows the URL (suggesting that no redirection took place).

I’ve tested rewording my htaccess redirection code 4 different ways. With each working fine with desktop Chrome and the website 301 checkers. But in each case get the exact same problems with the other browsers mentioned above. (It seems to be a redirect problem, but somehow not with my htaccess file, I guess).

The SSL certificate is an “Let’s Encrypt” one. I ran it through a website SSL checker and it suggested it was fine. It works fine when the correct URL shows in the browser address bar.

Is there some aspect of Drupal that could somehow negate or reverse my redirection directives for just the URL form:


Drupal version: