Below is the code to force www and https in the url of the page using htaccess, who needs it, for me it worked right. Hugs
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.site\.com\.br$ [NC]
RewriteRule ^(.*)$ https://www.site.com.br/$1 [L,R=301]