https://github.com/einaregilsson/Redirector Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} einaregilsson / Redirector Public * Notifications * Fork 69 * Star 582 * Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite. einaregilsson.com/redirector/ MIT License 582 stars 69 forks Star Notifications * Code * Issues 95 * Pull requests 3 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 5 branches 14 tags Code Latest commit @einaregilsson einaregilsson Merge pull request #212 from monoblaine/master ... 3cdd06e Jun 4, 2021 Merge pull request #212 from monoblaine/master Support numbered backreferences for numbers larger than 9 3cdd06e Git stats * 283 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time css UI fix for mobile Jan 27, 2021 images Change badge on off setting Dec 12, 2019 js Merge pull request #212 from monoblaine/master Jun 4, 2021 promo Promo Sep 25, 2015 .gitignore Build that works for Opera Oct 5, 2015 LICENSE Add MIT License Oct 25, 2016 README.md Update de-mobilizer rule Feb 24, 2021 build.py add Edge to build Dec 15, 2020 help.html Update help.html Dec 6, 2020 icon.html Mostly working on Firefox Sep 21, 2015 manifest.json Update version Dec 15, 2020 nex-build.sh Build that works for Opera Oct 5, 2015 popup.html UI fix for mobile Jan 27, 2021 privacy.md Privacy Sep 17, 2017 redirector.html UI fix for mobile Jan 27, 2021 View code [ ] Download links Examples De-mobilizer AMP redirect doubleclick escaper Fun with !bangs use DuckDuckGo.com !bangs on Google Custom DuckDuckGo.com !bangs DDG !example Base DDG !example Search !ghh git-history Dark theme README.md Download links * Firefox * Google Chrome and Vivaldi * Opera Examples De-mobilizer * Example URL: https://en.m.wikipedia.org/ * Include pattern: ^(https?://)([a-z0-9-]*\.)m(?:obile)?\.(.*) * Redirect to: $1$2$3 * Pattern type: Regular Expression * Description: always show the desktop site of a webpage AMP redirect * Example URL: https://www.google.com/amp/www.example.com/amp/ document * Include pattern: ^(?:https?://)www.(?:google|bing).com/amp/(.*) * Redirect to: https://$1 * Pattern type: Regular Expression * Description: AMP is bad: https://80x24.net/post/ the-problem-with-amp/ doubleclick escaper * Example URL: https://ad.doubleclick.net/ddm/trackclk/ N135005.2681608PRIVATENETWORK/B20244?https://www.example.com * Include pattern: ^(?:https?://)ad.doubleclick.net/.*\?(http?s:/ /.*) * Redirect to: $1 * Pattern type: Regular Expression * Description: remove doubleclick link tracking / fix problems with doubleclick host based blocking Fun with !bangs What are bangs?: https://duckduckgo.com/bang use DuckDuckGo.com !bangs on Google * Example URL: https://www.google.com/search?&ei= -FvkXcOVMo6RRwW5p5DgBg&q=asdfasdf%21+sadfas&oq=%21asdfasdf+sadfas &gs_l=asdfsadfafsgaf * Include pattern: ^(?:https?://)(?:www.)google\.(?:com|au|de|co \.uk)/search\?(?:.*)?(?:oq|q)=([^\&]*\+)?((?:%21|!)[^\&]*) * Redirect to: https://duckduckgo.com/?q=$1$2 * Pattern type: Regular Expression * Description: redirect any querry to google with a !bang to DDG Custom DuckDuckGo.com !bangs DDG !example Base * Example URL: https://duckduckgo.com/?q=!example&get=other * Include pattern: ^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(?:%21 |!)example(?=[^\+]|$)(?=\W|$) * Redirect to: https://example.com/ * Pattern type: Regular Expression * Description: redirect to the base site when bang is the only search parameter DDG !example Search * Example URL: https://duckduckgo.com/?q=searchterm+!example +searchterm2&get=other * Include pattern: ^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(.*\ +)?(?:(?:%21|!)example)(?:\+([^\&\?\#]*))?(?:\W|$) * Redirect to: https://example.com/?query=$1$2 * Pattern type: Regular Expression * Description: redirect to custom site search !ghh git-history * Example URL: https://duckduckgo.com/?q=! ghh+https%3A%2F%2Fgithub.com%2Fbabel%2Fbabel%2Fblob%2Fmaster%2Fpackages%2Fbabel-core%2FREADME.md &adfasfasd * Include pattern: ^(?:https?://)duckduckgo.com/\?q=(?:(?:%21|!)ghh \+)(?:.*)(github|gitlab|bitbucket)(?:\.org|\.com)(.*?(?=\&)) * Redirect to: https://$1.githistory.xyz$2 * Pattern type: Regular Expression * Description: https://githistory.xyz * Advanced: + Process matches: URL decode Dark theme If you are a Firefox user and use a dark theme, you can edit your userChrome.css file and add these lines to it for the extension button to more visible: /* Redirector button for dark Firefox themes */ toolbarbutton#toggle-button--redirectoreinaregilssoncom-redirector[image*="active"]{filter:invert(100%) brightness(600%);} toolbarbutton#toggle-button--redirectoreinaregilssoncom-redirector[image*="disabled"]{filter:invert(100%) brightness(250%);} If you don't know what the userChrome.css file is or how to edit it, please look it up on Firefox forums instead of asking about it on this repository. About Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite. einaregilsson.com/redirector/ Resources Readme License MIT License Stars 582 stars Watchers 32 watching Forks 69 forks Releases 14 tags Packages 0 No packages published Contributors 15 * * * * * * * * * * * + 4 contributors Languages * JavaScript 52.1% * HTML 31.4% * CSS 13.2% * Python 2.4% * Shell 0.9% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.