You can do the following in a cloudflare page rule:
if the url matches example1.com/*/*/*/*
then forwarding url is example2.com/$2/$3/$4 ($1 being discarded in this example)
in a cloudflare forwarding page rule, each * represents an individual part of the url string, as opposed to mod_rewrite in apache, where $1 represents the entire url string
How can i achieve the same functionality with mod_rewrite as cloudflare?