Try these rules in the htaccess file in the root directory of the document.
RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{REQUEST_URI} ^(/wp-login|/products-page/checkout|/products-page/your-account) RewriteRule ^(.*)$ https://mydomain.com/$1 [R,L]
The first condition checks if the request is not HTTPS, the second checks whether the request starts with /wp-login , /products-page/checkout or /products-page/your-account , and if both apply, then the rewrite just takes the whole URI and redirects to https: //.
source share