Force https using htaccess

Permalink
i am trying to force all forms of the web address to use the https format.
So www will redirect to https, and http: will redirect to https

I have the htaccess code for wordpress but my it says it will not work for concrete5

I need the code for both 5.7 and 5.8 as I have sites built in both

cayercreative
 
tallacman replied on at Permalink Reply
tallacman
Im using this.
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ https://www.motherfuckingcmswebsite.com/$1 [R,L]


not sure where I got it from