There is such a rewrite
RewriteEngine on RewriteCond %{HTTP_HOST} !^www.example.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]
You must add http => https to it.
How to implement it? checked google, but the changes that I found led to the fact that the site was rebooting without end