How to add origins as a subfolder of domain?

I’m evaluating Cloudflare as a replacement for Akamai.

In Akamai I’m able to specify different origins as subfolders of the main domain. For example:

domain .com = origin1 .domain .com (default)
domain .com/subfolder1 = origin2 .domain .com
domain .com/subfolder2 = origin2 .domain .com

So any request to is proxied to the origin application on domain

Is this possible with Cloudflare?


It is possible, but you will need Workers for that, which is a paid feature (unless the free limit is sufficient) and requires custom JavaScript code. There are probably examples here on the forum.

1 Like

Thanks. Sounds possible but tricky. I think I’ll use a NGINX reverse proxy on the origin to avoid too much complexity in Cloudflare.

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