Docs / Modifying Traffic
Rewrite Rules
Automatically modify matching requests and responses.
Rewrite rules apply edits to any traffic matching a URL pattern (* matches any run of characters), with no pausing needed. Open Tools → Rewrite Rules (⌘⇧R, PRO).
What a rule can do
- Header modifications: add, remove, or replace request/response headers.
- Body replacement: swap the request or response body (GET and HEAD requests keep their empty body).
- Scope: apply the rule to the request, the response, or both.
TipFor swapping a whole response with a local file, use Map Local; to retarget a host, use Map Remote.