How would I redirect my sub domain to https with .htaccess? I've tried to do this:
RewriteCond %{HTTP_HOST} ^sub\.example\.com$ [NC]
RewriteCond %{HTTPS} off
RewriteRule ^ https://sub.example.com%{REQUEST_URI} [R=301,L,NE]
But it didn't work I just got a cloudflare error. I've also tried this:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
and it didn't work also just got the same cloudflare error