Htaccess http to https

Hi Guys, quick question about htaccess file. I route all my traffic to my index.php file nd my htacess looks as follows

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

but if i want all the traffic to be https and still threw my index file will how will my htaccess look like then?

I managed to figured it out

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^domain.co.za$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.co.za$
RewriteRule ^/?$ “https://domain.co.za/” [R=301,L]