So i need very simple codes for .htaccess
I want to redirect all traffic to https in main domain and redirect all traffic to http in subdomain without WWW.
Right now i am using this code to redirect all traffic to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
So main domain should be like this: https://website.com
and subdomain should be like this: http://sub.website.com
I found many answers but very complicated, so need simple solution.
EDITED
Solution given by anubhava works great. Thanks for your solution.