.htaccess rewrite if address includes /grav/ subdirectory in path?

My grav install is in a subdirectory of my web root. The web root’s .htaccess redirects mysite.com/foo traffic to mysite.com/grav/foo, while the address bar in the browser continues to just show mysite.com/foo. All good.

But I can still enter mysite.com/grav/foo in the address bar, and the ‘foo’ page loads, while the address bar continues to show /grav/ in its path. That’s

Is there a way to change this without changing the default .htaccess in /grav/ ?

I would like to avoid altering the .htaccess of the grav installation itself to maintain the way grav allows us to only tend to the grav/user folder.

And as a user of shared hosting, I don’t have access to apache vhost config.

So without finding a solution to my issue, I’ve added an issue on github.

I’m a little confused with what your saying/asking.

Do you only want visitors to be able to see mysite.com/foo even if the go directly to mysite.com/grav/foo

Hi, thanks for replying. Yes, that’s exactly right.