Rule to Redirect only http `GET`; but not http `POST`?

Hello Cloudflare community,

While this Cloudflare Community post establishes that a Redirect rule doesn’t preserve request body.

My question for the community is: is there a way to redirect only http GET method to a new url, while http POST method is not redirected? (The POST method is allowed through to the old url).

Thanks for your help Cloudflare Community :slight_smile:

Havent tested yet but you could try looking at the http.request.method field?
i.e. create a Dynamic Redirect with an expression of something like … http.request.method eq GET?
Let me know how it goes, curious to hear :slight_smile:

1 Like

If you want the redirect to preserve the method and body to the new URL, you need to use a 307 or 308 response code.