Minimal plan that can do page level proxying?

Here’s what I want to do. I’ve got two existing sites: a.acmecorp.com and b.acmecorp.com. I’m going to make www.acmecorp.com which is mostly the b site, but if you click on the right pages you’ll get some content from a. (I have to write these out as www_acmecorp_com because I’m a new user and I can’t post more than 4 links in a page.)

If a visitor visits www_acmecorp_com/foo/, I want Cloudflare to serve the corresponding page under a_acmecorp_com/foo/ . Likewise for www_acmecorp_com/bar/ . But any other page comes from b … e.g. www_acmecorp_com/whatever should serve b_acmecorp_com/whatever

On a basic plan I can’t seem to make a rule that makes this happen. What plan should I be on? Or is this just something that Cloudflare doesn’t do?

Greetings,

Thank you for asking.

From what I understand, I’d suggest using Transform Rules → URL Rewrite:

Furthermore, if you are trying to accomplish to have sub-domains with www prefix just like www.a.acmecorp.com or www.b.acmecorp.com, you’d have to use Advanced Certificate Manager, otherwise you would end up having an issue as described on the article from below:

I don’t think transform rules do what I’m needing to do. I don’t want the end users to see a.acmecorp.com – they should only see www.acmecorp.com. I can’t see how a rewrite rule solves this: I don’t want to change the path, nor do I want to change the query, which seems to be the only things that rewrite rules can do. I want to preserve them, but modify the host that Cloudflare fetches those pages from.

Unless there’s an extra kind of rewrite rule that becomes available on a pro plan?

You can still achieve this, under www to stay www in URL browser bar and to display content from a.acme or b.acme.

Then, I’d use Cloudflare Workers.

May I ask, why don’t you just switch content to serve under the www.acmecorp.com? :thinking:

I might not understand.

Use preformated text like https://www.domain.com/ or wrap it around `` or select text and “CTRL+E” or select text and click on the icon:
preformated_text

Kindly and patiently wait for another reply.

1 Like

May I ask, why don’t you just switch content to serve under the www.acmecorp.com ?

One site is a custom-built application, the other site is wordpress. Both are hosted on low-end ISP-hosted servers. Two different teams update these sites, but we don’t want that to be visible to customers.

Yes, this looks as though it might work:

https://developers.cloudflare.com/workers/examples/respond-with-another-site

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.