A tiny Chrome (MV3) extension that redirects URLs with simple wildcard rules — and lets you check exactly what a rule does before you rely on it. No save-and-pray like the original Redirector.
- Wildcard redirect rules. Write a
Frompattern with*and aTotarget with$1,$2, … Example:https://github.com/*→https://dev.github.com/$1. - Debug any URL. Paste a URL and see which rule fires and where it lands — or exactly why none does (no match / disabled / shadowed by a higher rule). This is the testing loop: you confirm a rule before trusting it instead of guessing.
- Priority by order. Drag rules to reorder them; the topmost matching rule wins.
- Per-rule scope. Under Advanced, choose whether a rule applies to top-level pages, iframes, or both.
- Import / Export. Back up or share your rules as JSON.
- On/off in one click. The toolbar popup is a global switch with a live count of active rules.
- Minimal + small. Pure static MV3 files — no backend, no build step, no framework. The packaged extension is ~50 KB.
The Debug any URL panel and the installed redirect run the same compiler
(src/compile.js). Each rule compiles to a declarativeNetRequest dynamic rule
(regexFilter + regexSubstitution), and a conformance test proves the regex we emit matches
URLs identically under real RE2 (the engine Chrome uses) and the JS RegExp the debugger
uses — so the debugger's verdict is the production verdict.
*in the From pattern matches any run of characters and is captured.- Reference captures in the To target as
$1,$2, … (up to$9). Use$$for a literal$. - The whole URL must match (patterns are anchored). Matching is case-sensitive.
- Example:
https://reddit.com/*→https://old.reddit.com/$1.
Redirects compile to RE2 (Chrome's
declarativeNetRequestengine), so there are no backreferences or lookarounds — but for URL→URL redirects that covers what Redirector is actually used for.
- Download or clone this repo.
- Open
chrome://extensions→ enable Developer mode → Load unpacked → pick this folder. - Open the extension's Options to manage rules; the toolbar popup is the global on/off.
npm install # playwright (for gates) + re2-wasm (for conformance)
npm test # unit tests + RE2 conformance (no browser needed)
npm run test:ui # drives the real UI in chromium + refreshes docs/screenshots
npm run package # build dist/reroute-v<version>.zip for the Chrome Web StoreTests:
test/compile.test.mjs— the wildcard compiler/matcher (escaping, captures,$nsubstitution, anchoring, priority resolution).test/conformance.test.mjs— the "what you debug is what ships" proof: the emitted regex matches URLs identically under real RE2 (re2-wasm) and the JSRegExpthe debugger uses.test/ui.mjs— drives the actual editor and reverse debugger in chromium.test/browser.mjs— a live gate that loads the unpacked extension and asserts a real navigation is redirected end to end (desktop only; see the note below).
Note: Chrome 137+ ignores the old
--load-extensionswitch, and under Playwright's Chrome-for-Testing a CDP-loaded extension loads but stays inert (no service worker, pages blocked, DNR rules don't fire), sonpm run test:browsercan't drive it everywhere. To verify a live redirect, use the Load unpacked steps above in regular Chrome.
URL Rerouter is private by design. Your redirect rules and the on/off setting are stored
locally on your device via chrome.storage.local and are never transmitted anywhere.
Redirects are performed by Chrome's own declarativeNetRequest engine — the extension does
not run code on the pages you visit. The <all_urls> host permission exists only so your
redirect rules can match any site; it does not read page content or send any browsing data
anywhere. No analytics, no tracking, no third parties.
Full details: PRIVACY.md.
MIT — see LICENSE.

