Should look like this with a real example where you don't want to redirect domain.com/test_url/
Code:
RewriteEngine On
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} !^\/test_url\/
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=301]
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} \/test_url\/
RewriteRule (.*) http://%{HTTP_HOST}/$1 [L,R=301]
But while you are on Cloudflare you may try to exclude it on their end and force everything else to SSL:
https://stackoverflow.com/questions/...ed-url-pattern