Skip to content

Rewrite rules

Rewrite rules let you change requests and responses on the fly before they reach the server or the UI.

What rewrite rules can do

Use rewrite rules to:

  • Redirect requests to a different URL.
  • Modify request headers, query params, cookies, or body.
  • Modify response headers, body, or status code.
  • Block requests entirely.

Create a rule

  1. Open the Tools tab and tap Rewrite Rules.
  2. Tap Add Rule.
  3. Choose a Rule Type (redirect, modify, block).
  4. Configure the Match criteria (exact, contains, wildcard, or regex).
  5. Add one or more Actions.
  6. Save and enable the rule.

Matching and priority

  • Rules match on the request URL.
  • Use priority to control evaluation order.
  • Enable Stop processing to prevent later rules from running after a match.
  • Use tags to group and filter rules.

Common actions

  • Set or remove headers.
  • Replace or set the body.
  • Redirect to a new URL.
  • Add delays.
  • Encode/decode body content.
  • Adjust status codes and connection behavior.

Advanced tools

The rewrite rules screen provides additional tooling via the toolbar menu:

  • Rule Wizard: step-by-step guided rule creation.
  • Visual Editor: point-and-click rule builder.
  • Rule Testing: test a rule against a sample URL before enabling it.
  • Import rules: import rule sets exported from Proxyman, Charles, Fiddler, or HAR files.

Tip

Start with a single rule and verify it applies to one request before broadening the match pattern.