Skip to content

Rewrite URL query string

Create a transform rule to rewrite the request path from `/blog` to `/blog?sort-by=date`.

To rewrite a request to the /blog path to /blog?sort-by=date, create a rewrite URL rule with the following settings:

Example

Text in Expression Editor:

http.request.uri.path == "/blog"

Text after Query > Rewrite to… > Static:

sort-by=date

Additionally, set the path rewrite action of the same rule to Preserve so that the URL path does not change.