Serve domain.APP from domain.COM/SUB

The situation is as follows: is the primary domain hosted at Hoasted. is the domain for the app hosted at Vercel

Now what I want is to serve from

Because the domains are on 2 separate servers I can’t use Alian domain with a htaccess redirect. I read something about the workers from Cloudflare.

How can I get the .app domain to the .com/app ? Im also happy with another work around.

You could build something around this example.

Thanks for your reply that looks advanced code for me. I can ask my developer to take a look at.