GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rxliuli/redirector: Dynamic URL Redirector

BranchesTags
Open more actions menu

Latest commit

 

History

177 Commits
177 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
public
public
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
PRIVACY.md
PRIVACY.md
 
 
README.md
README.md
 
 
components.json
components.json
 
 
extport.config.json
extport.config.json
 
 
package.json
package.json
 
 
playwright.config.ts
playwright.config.ts
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
tsconfig.json
tsconfig.json
 
 
vitest.config.ts
vitest.config.ts
 
 
wxt-env.d.ts
wxt-env.d.ts
 
 
wxt.config.ts
wxt.config.ts
 
 

Repository files navigation

Redirector

Chrome, Safari, Edge, Firefox

What does Redirector do?

Redirector automatically redirects URLs from one site to another based on rules you set up. Once a rule is active, every time you visit a matching URL, you'll be instantly sent to the destination you configured — no extra clicks needed.

Common use cases:

  • Always use Old Reddit instead of the redesign
  • Switch Google search results to DuckDuckGo
  • Skip tracking redirects (e.g. email click-tracking links) and go straight to the destination
  • Redirect a deprecated internal tool URL to its replacement

Quick Start — Your first rule in 30 seconds

Let's set up a rule that automatically redirects reddit.com to old.reddit.com:

  1. Click the Redirector icon in your browser toolbar — the options page will open
  2. Click Add Rule
  3. Fill in the two fields:
    • Match URL: ^https://www.reddit.com/(.*)
    • Redirect To: https://old.reddit.com/$1
  4. (Optional) Paste a test URL like https://www.reddit.com/r/cats to verify the result — you should see it redirect to https://old.reddit.com/r/cats
  5. Click Add — done!

Now visit any reddit.com page and you'll be automatically redirected to old.reddit.com.

How the pattern works

  • ^https://www.reddit.com/ matches the beginning of any Reddit URL
  • (.*) captures everything after the domain (e.g. r/cats)
  • $1 in the Redirect To field inserts that captured part into the new URL

That's the basic idea: match a URL, capture the parts you need, and build a new URL with them.

Managing Rules

  • Enable / Disable — Toggle individual rules on or off without deleting them
  • Reorder — Rules are checked from top to bottom; set a rule's Position in the dialog's Advanced section to move it
  • Exclude Pattern — Optionally set a pattern per rule; URLs matching it are never redirected by that rule
  • Test — Paste any URL in the Test URL field to see which rule matches and where it redirects
  • Import / Export — Back up your rules as a JSON file, or share them with others

More Examples

Redirect Google search to DuckDuckGo

  • Match URL: ^https://www.google.com/search\?q=(.*?)&.*$
  • Redirect To: https://duckduckgo.com/?q=$1

Redirect X/Twitter to xcancel, except the home feed

  • Match URL: ^https://(?:twitter|x)\.com/(.*)
  • Exclude Pattern: https://(twitter|x)\.com/home
  • Redirect To: https://xcancel.com/$1

The exclude pattern keeps /home on the original site while everything else is redirected.

Skip email click-tracking redirects

  • Match URL: https://click.redditmail.com/CL0/(.*)
  • Redirect To: {{$1|decodeURIComponent}}

The {{$1|decodeURIComponent}} syntax decodes the URL-encoded destination so you go straight to the real link.

Decode base64-encoded redirect URLs

  • Match URL: https://mail.yandex.ru/re.jsx\?.*&l=(.*)
  • Redirect To: {{$1|atob}}

Advanced: URL Pattern Mode

In addition to regular expressions, Redirector supports URL Pattern mode — a more readable syntax for matching URLs. Select "URL Pattern" in the Mode dropdown when creating a rule.

  • Redirect Google search to DuckDuckGo:

    • From: https://www.google.com/search?q=:id&(.*)
    • To: https://duckduckgo.com/?q={{search.groups.id|decodeURIComponent}}
  • Decode URL parameters (e.g. Zhihu outbound links):

    • From: https://link.zhihu.com/?target=:url
    • To: {{search.groups.url|decodeURIComponent}}

Advanced: Pipeline Syntax

The {{}} syntax supports chaining transformations on captured values:

Pipeline What it does
decodeURIComponent Decode URL-encoded strings (%2F → /)
atob Decode base64-encoded strings

Examples:

  • Single: {{$1|decodeURIComponent}}
  • Chained: {{$1|atob|decodeURIComponent}}

Note: The plain $1 syntax does not support pipelines. Use {{$1}} when you need transformations.

Privacy

Redirection rules are matched entirely on your device — no URL or page content is ever transmitted by that feature. Redirector does send one anonymous daily usage ping (install count and version only, no browsing data). See PRIVACY.md for the full policy.

Contributions

Contributions are welcome! If you have any suggestions for improvements or have found a bug, please open an issue or submit a pull request.

License

MIT License

Contact

If you have any questions or suggestions, please contact us at [email protected].

About

Dynamic URL Redirector

store.rxliuli.com/extensions/redirector/

Resources

Readme
MIT license
Activity

Stars

91 stars

Watchers

3 watching

Forks

22 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.