ubuntu – Apache rewrite / redirection problem

I have the text below in my 000-default.conf file (Ubuntu and Apache 2.4.34), but when I access www.mydomain.us or mydomain.us, I'm not redirected to the https page that works directly with https. : //www.mydomain.us


        
        
        
        # The ServerName directive defines the query schema, hostname, and port that
# the server uses to identify itself. This is used during creation
# Redirect URL. In the context of virtual hosts, the ServerName
# specifies which host name should appear in the header Host: of the request
# corresponds to this virtual host. For the default virtual host (this file), this
The # value is not critical because it is used at all times as a last resort host.
# However, you must explicitly set it for any other virtual host.
#ServerName www.example.com

Webmaster ServerAdmin @ localhost
DocumentRoot / var / www / html

# Available connection levels: trace8, ..., trace1, debug, info, notification, warn,
# error, crit, alert, emergent.
# It is also possible to configure the logging level for
# modules, for example
#LogLevel info ssl: warn

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined

# For most conf-available / configuration files, which are
# enabled or disabled globally, it is possible to
# include a line for a single virtual host. For example,
The following line enables CGI configuration for this host only
# after being globally disabled with "a2disconf".
#Include conf-available / serve-cgi-bin.conf
RewriteEngine on
RewriteCond% {SERVER_NAME} = *. Mydomain.us
RewriteRule ^ https: //% {SERVER_NAME}% {REQUEST_URI} [END,NE,R=permanent]

There is nothing in the error logs and log files indicate, as they are presented but not expected, that it serves the page in / var / www / html. I have searched on Google but I have not found anything useful that corresponds to this problem.

Thank you in advance.