Transform Rewrite rules for Cloudflare custom domain

But here in this earlier thread, there’s the option mentioned in the final reply where they mention that the host can be rewritten too? Custom domain for website hosted on a subfolder - #3 by goutham.chandran

It will append the path to the domain in the request sent to your origin server. So when the user visits > Cloudflare will send a request to

If not for the rewrite rule, is there another option or is it only possible with custom middleware which runs and serves the appropriate page?