I have a main domain, eg.: mydomain.com.
A Single Page Application: myApp, hosted on: myApp.somehost.com (IP: {ip.of.myapp}).
A WordPress Site: myWP, hosted on: myWP.anotherhost.com (IP: {ip.of.mywp}).
The goal:
How would you solve the second one? Is there a frontend-proxy service provider or so?
What I tried:
What should I do? Please help... Thanks
Note: I'm not planning to move myApp and myWP from their current servers.
You are correct about rewrite rules not supporting this with Cloudflare, but you can use Cloudflare Workers to act as a proxy. Here is a blog article going over details of one way you could achieve what you are looking for -
https://blog.cloudflare.com/subdomains-vs-subdirectories-improved-seo-part-2/
Here are also a number of other Worker examples that may come in handy -
https://developers.cloudflare.com/workers/examples
Do keep in mind the pricing / limits of free plan if you go this route - https://developers.cloudflare.com/workers/platform/pricing