Redirects

Redirect Rules rewrite a request's URL before it goes out — a find/replace for traffic. Use them to point a request at a different host, swap a query parameter, or reroute a path during local development.

Two modes

  • Simple — a literal find/replace on the URL text. No regex knowledge needed.
  • Regex — a regular expression, with capture groups and backreferences, for anything a literal match can't express.

Switching between the two only applies instantly if your existing find text still makes sense in the new mode (a literal string that isn't valid regex, for example). Otherwise DevHeader holds the change as a draft so you can fix it before it's saved.

Live preview

As you type, the Redirects tab shows a live preview of what your rule will do to a sample URL:

  • In Simple mode, the preview uses your own find text, so what you see is exactly what will match.
  • In Regex mode, the preview uses a generic sample URL, since an arbitrary pattern can't be reverse-engineered into one. If your pattern doesn't match the sample, the preview just shows "not matched" — it doesn't mean your rule is broken, only that this particular sample doesn't happen to match it.

Creating a rule

  1. Open the Redirects tab.
  2. Add a rule, fill in Find and Replace, and pick a mode.
  3. Optionally narrow which requests it applies to — by resource type (scripts, XHR, images, etc.) or HTTP method — via the filters button.
  4. Click Save Changes.

The enabled toggle and the filters modal apply immediately; editing Find/Replace text stays a local draft until you save.

Scope

Like every rule type, a redirect only fires on domains you've scoped it to (or everywhere, if your domain list is empty) and only once you've granted the one-time permission — see Domains. Redirects also apply to full page navigations, not just background requests, so typing a URL or clicking a link can be redirected too.