Redirects from www pages to /index.php

Hi all.

On a simple Quark install without much customization at system config level, all is working fine, including all redirections to https://, except redirections from WWW to non WWW for inside pages only.

Page will redirect to :frowning_face: instead of

Same behavior for and,
and same for all inside pages.

How can WWW be redirected to /index.php ??? :frowning_face:

Redirections in .htaccess are as follows, identical to on my other Grav sites :

# Remove trailing slash from non-filepath urls
RewriteCond %{REQUEST_URI} /(.+)/$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ [R=301,L]

# Include trailing slash on directory 
RewriteCond %{REQUEST_URI} !(.+)/$
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+)$$1/ [R=301,L]

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

Error pages, as long as there is no WWW, correctly redirect from
nothing or http:// or https:// to

I have never seen this on a Grav site. I suppose something is happening in Grav settings but a few hours on this did not help me find the culprit.
This site have just a few special plugins and disabling them do not help. All updated. I tried to look in the webmaster console and Grav Clockwork debugger and, as much as I understand those tools, I could not see information on this.

Any brilliant idea?
Thank you if you have a hint.