Based on @WalshyMVP’s reply, I assume that proxying redirects support (when the [code]
is 200
) will be added to Cloudflare Pages in the near future.
/blog/* https://blog.my.domain/:splat 200
So I’d like to propose three implementation details.
1. In-host redirects
The following _redirects
file implements /css/*
as an alias for /assets/css/*
.
/css/* /assets/css/:splat 200
And of course full URL redirects on the same host should be considered in-host redirects to avoid infinite loops.
2. In-place redirects
The following _redirects
file implements that all paths except /robots.txt
will be redirected to the /
.
/robots.txt /robots.txt 200
/:_ /
/:_/* /
Perhaps in-place redirect will be the only way to implement something like this.
3. Follow redirects
The following _redirects
file implements a way to follow 3XX
redirect responses while proxying.
/blog/* https://blog.new.domain/:splat 200 FollowRedirects=true
The user will only see the last response.