Need help moving / setup grav on subdirectory but root URL

Hi, I hope this message finds you well :tanabata_tree::sunflower::tada:
I’m trying to move a Grav install from a domain to another domain.

I was able to see all works just moving the folder in the new domain but what I want do this time is hide the subdirectory from the URL.

My new domain is www.newdomain.ext
Grav in reachable at www.newdomain.ext/grav/it where it is the language and is something added automatically when I load www.newdomain.ext/grav

Now I want that the home page showed at grav subfolder URL is showed when load the main url so from www.newdomain.ext/grav to www.newdomain.ext

I tried to follow the guide Change the site URL | Grav Documentation but for me never works.

I tried to place in the root .htaccess the rule

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/grav/
RewriteRule ^(.*)$ /grav/$1

But I get browser redirection loop error.

I tried to set the custom_base_url in system.yaml as custom_base_url: ‘https://newdomain.ext’ but still doesn’t work.

I get redirect browser error.
Any help?

Why not just move your whole Grav installation from /grav to root?

Because in the root I have other files and things that should be not mixed.
Can the issue caused because to the grav folder is added automatically also the language?

www.domain.ext/grav redirect to www.domain.ext/grav/it
Seems not.

Maybe the issue is related I use the Plesk Panel?

The issue happen only while trying to setup an existent grav instance
If I setup a new grav no issues but I need just move my existent grab so what can be the cause of the infinite loop redirection?

Seems is not a server issue but a Grav issue.

Why don’t you use subdomains that point to a subdirectory within your site root?

For example, subdomain1.domain.com would be in the /subdomains/subdomain1 folder (with full Grav installation inside)

Because I need use grav for a specific domain.
Grav is a CMS that give content so my need is just to show that content on that domain.
In any case I created an install from zero and recreated pages one by one.

I was able to replicate often the issue of the loop redirection, even in a new install.
I also discovered that install a SEO extension made grav crash. Now I’m no more using a SEO extension.

It’s not clear to me what can be done to resume back grav when an extension broke it. I tried to set disabled in the extension configuration file but grav was always still broken.

In any case now all is fine I setup grav on new domain but with an install from zero.

I was unable to move my existing grav from domain.ext/grav to domain.ext