I have this .htaccess rule

> 
> RewriteEngine On
> 
> 
> RewriteCond %{HTTPS} off
> 
> 
> RewriteRule ^(.\*)$ <https://%>{SERVER\_NAME}%{REQUEST\_URI} [L,R]
> 
> 
> 

This covers the parent domain but not the subdomain.

My subdomain has the same public folder as of parent domain.

example.com is redirected to <https://example.com>

But subdomain.example.com is not redirected to <https://subdomain.example.com>

As I said above that both points to same public folder so I want the above rule to handle both.

But I don't want to write my domain or subdomain name in htaccess rule. It shall cover any domain and any subdomain