RequestOrbit
Advanced rule examples
Practical redirect recipes for development, migrations, and controlled debugging.
Send a staging API to a local server
This keeps everything after /v1/ as capture $1. It is useful when a real frontend should talk to a local API or reverse proxy without changing the application build.
Include only the methods your local server handles. The initiator limits the rule to requests started by app.example.com.
Match type Simple wildcard
Match https://api.staging.example.com/v1/*
Resources XMLHttpRequest
Methods GET, POST, PUT, PATCH, DELETE
Initiator app.example.com
Action Redirect
Destination http://localhost:3000/v1/$1
https://api.staging.example.com/v1/users/42
→ http://localhost:3000/v1/users/42
Move a controlled site from an old CDN
This preserves the complete asset path while moving scripts, styles, images, and fonts to a new host. Use it as a temporary compatibility bridge while updating the site itself.
This is an unconditional redirect, not a failover: the browser will not try the old CDN when the new one fails.
Match type Simple wildcard
Match https://static.legacy.example.com/*
Resources Script, Stylesheet, Image, Font
Initiator www.example.com
Action Redirect
Destination https://cdn.example.com/$1
https://static.legacy.example.com/assets/app.css
→ https://cdn.example.com/assets/app.css
Bridge a read-only API version with regex captures
Two capture groups preserve the resource family and identifier while changing /v1/ to /v2/. Restricting the method to GET avoids silently changing write semantics.
Regular-expression support is checked by the active browser when you save. Prefer Simple wildcard when each * can safely stand for one captured part.
Match type Regular expression
Match ^https://api\.example\.com/v1/(users|projects)/([^?]+)$
Resources XMLHttpRequest
Methods GET
Initiator app.example.com
Action Redirect
Destination https://api.example.com/v2/$1/$2
https://api.example.com/v1/projects/alpha
→ https://api.example.com/v2/projects/alpha
Replace one production bundle during regression work
An exact URL filter can replace a single script with a local debugging build. This is useful for controlled regression testing without redirecting every asset on the site.
Use this only on an application you control. A local HTTPS server avoids mixed-content restrictions when the page itself uses HTTPS.
Match type URL filter
Match https://app.example.com/assets/checkout.js
Resources Script
Initiator app.example.com
Action Redirect
Destination http://localhost:5173/checkout.js
Read this before copying a recipe
Every example uses reserved example.com names. Replace them with origins you control, create the rule disabled, and use Test rule on representative URLs before enabling it.
Redirect and request-header rules change what a page receives. Keep resource types and initiator domains narrow so an unrelated page cannot trigger the rule.
What Redirect does not do
A redirect runs whenever all match conditions pass. It cannot wait for a 404, inspect a response body, choose a destination after a network failure, or run JavaScript to compute a URL.
- Targets must use HTTP or HTTPS.
- Simple-wildcard and regular-expression captures are referenced as $1 through $9.
- Query-string order, decoding, and repeated keys are not automatically normalized.
- Avoid redirect cycles; RequestOrbit blocks obvious self-redirects and detected cycles.
Rules stay in your browser. There is no analytics code and no remote service handling your rules.