Backtrack. Based on your last post, there are-- sit tight-- eight possible inputs. In each case, look at what happens by default (that is, if you have no added htaccess rules), and what you want to have happen. Your desired result is the same for the second block of 4 as for the first block, but it sounds as if your server is handling some of them differently.
http://example.com
http://example.com/
[
example.com...]
[
example.com...] >> no change needed
http://example.com/blahblah **
http://example.com/blahblah/
[
example.com...] **
[
example.com...] >> no change needed
** Here you
also need to determine whether blahblah is a file or directory: that is, does the part after the last slash include dot-plus-extension.
I said "input" but of course most of them won't be type-ins. So you also need to see what's arriving in your htaccess. Any site-internal links
should arrive with the same protocol as their source (http or https). Conversely, check whether any changes or expansions-- such as adding index.html-- have happened
before the page reaches your htaccess.
And, when it's all done, regularize to with-or-without www. Whew.