RewriteEngine On
Options All -Indexes
# WWW Redirect.
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# HTTPS Redirect
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# URL Rewrite
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1
# WWW Redirect = Force redirect when typed WWW
# HTTPS Redirect = Forces redirect to HTTPS
# URL Rewrite = Apply the file conditions by applying the rules for files (!-f) and directories (!-d)
Apache documentation link, where an explanation more examples of possible settings.
Apache documentation
And your site responds normally by accessing directly by HTTPS?
– Bacco
https://answall.com/a/143653/70
– Bacco