Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex
47 comments
·June 1, 2025rdmuser
rdmuser
Oups linked the wrong hn thread about that easter egg. Here is the one that got a bunch of attention back in 2017: https://news.ycombinator.com/item?id=14653017
out-of-ideas
for firefox, i use `request-interceptor` ( https://addons.mozilla.org/en-US/firefox/addon/request-inter... )
though sadly it has not had an update in a while (a dark mode would be great) (and rarely, a page-url match does not always match a request-rule where i believe some javahell shinanigans take over and somehow get their way)
Bluestein
Really sad to hear.-
kmfrk
Been using this for a long time, and it's fantastic.
I also found out that Kagi (the paid search engine) supports rewriting results, which is probably where you'll see a lot of the links you follow.[1]
For instance, if you get some Fandom results, you can change them to antifandom that is part of the BreezeWiki project[2], if you so prefer: https://forgottenrealms.antifandom.com.
neodymiumphish
I’m a Kagi subscriber and didn’t know about this… thanks!!
Bluestein
> Kagi (the paid search engine) supports rewriting results
This is such a value-add! Pretty smart guys.-
nileshtrivedi
I find it annoying when people share direct URLs to PDFs at arxiv.org instead of the the abstract. However, if I were to use a redirect extension like this one, then my own click on the PDF link would get redirected back to the abstract page. To handle this, the redirect rule needs to consider the referer page too, with a possible exception if the referer is the same site as the destination.
imurray
I wrote firefox and chrome extensions that do exactly what you want:
Firefox: https://addons.mozilla.org/en-US/firefox/addon/redirectify/
Chrome: https://chrome.google.com/webstore/detail/redirectify/mhjmbf...
Source: https://github.com/imurray/redirectify
Sadly I never got around to making it configurable, so it's just a fixed table of rules for a handful of journal and pre-print sites.
mook
For something like that, on Android I find it fine to install the URL Forwarder app from F-droid and share the link to the app. That way you opt-in to the modification (I use it to load things with Archive.today from HN).
godelski
Dear god... this is a major pet peeve of mine. I frequently open the links on my phone and the pdf just eats data and results in a terrible reading experience.
The reason I open on my phone is because I find via places like HN, Twitter, Bsky, read the abstract, and then send the link back to my computer for later reading (Firefox send tabs). 99.9% of the time I do not want the pdf...
purpleidea
I've used this before, but the biggest missing feature is a compendium of built-in common fixes, like removing the &si= tracker junk off of youtube links, and so on...
schiffern
This is the "God-like powers" extension. The "set it and forget it" extension is called ClearURLs.
There's also Request Control, which is probably what you're looking for. More powerful than Redirector actually, but it comes with some common rules built in (not as comprehensive as ClearURLs though).
dmit
Or these, which have their own Wikipedia page: https://en.wikipedia.org/wiki/UTM_parameters
ftk_
If you have uBlock Origin installed you can enable URL tracking protection filter list or write your own filters `$removeparam=<tracker param>`.
DimitriBouriez
The extension is no longer available on Chrome. So, I am looking for a way to automatically redirect x.com to xcancel.com
Argonaut998
Just write a simple user script with Tamper/Greasemonkey. You can even paste it into ChatGPT and it will give you one.
chris_pie
For this specific case there's a "Nitter Redirect" extension
aspenmayer
MallocVoidstar
This is also a MV2 extension and therefore also not available on Chrome.
schiffern
Not sure what search you're using, but Googling `xcancel redirect` gave me plenty on the first page. You could be stuck in a search bubble. Maybe try searching in private browsing mode?
This one is manifest v3: https://chromewebstore.google.com/detail/xcancelcom-redirect...
This userscript (despite the name) also redirects to xcancel: https://greasyfork.org/en/scripts/450008-twitter-to-nitter-r...
aspenmayer
It is available for Chromium, though.
Argonaut998
All of this can be done with a simple script for Tamper/Grease/Violentmonkey if you don’t want to install an extension or are concerned about it not being supported in Manifest V3
userbinator
I use a filtering proxy to do this. Much more control, and as someone who regularly uses several browsers simultaneously, no need to configure each one separately.
Bluestein
There used to be this nice proxy-thing for windows called the "Proxomitron" (or such), peculiar one-eyed pyramid icon and everything! Wonder if it's still around. Been a while.-
godelski
The first example makes me wonder: why is Wikipedia so... bad?
It can redirect mobile users to the mobile site but still serves desktop users the mobile site. Why is this reverse direction so hard?
What the fuck is up with the light/dark theme feature? I'm really happy they implemented it, but why is the default 'skin-theme-clientpref-day' (light theme)? Shouldn't the default be 'skin-theme-clientpref-os' (automatic)? What's the point of having "automatic" if it isn't... you know... automatic? It's literally a one liner (setting default value). Am I missing something much more nuanced?
I see stuff like this all the time, not just on Wiki. Stuff drives me nuts. Just adds needless extra work. I know it is kinda petty to complain about having to click an extra button or two, but I thought the whole point of programming was to automate stuff. Hell, how often do we automate stuff that doesn't need to be lol. Isn't the classic programmer problem that we spend more time automating and optimizing than would be saved by the automation? I mean the theme issue is 5 seconds of work and saves a billion users 2 seconds, each. That one seems worth it if there isn't some other issue.
hexage1814
I use it all the time, pretty handy. Sadly, as people mentioned the original developer passed away and the community needs help, especially to port to manifest V3.
bonki
Curious, what are you using it for? Do you have a few examples?
hexage1814
For instance, I use to: redirect new reddit site to old.reddit.com
I keep a blog on wordpress.com, but I really dislike their new blog admin interface, but the interface one can still be accessed , so I redirect to there to edit my posts on the old interface
I use some alternative front-ends, like imginn.com, which is alternative front-end to instagram, so I set to redirect links there.
This sort of thing.
hadrien01
Redirects from translated versions of Google or Microsoft documentation to the English one. The Microsoft ones are okay-ish but I strongly prefer reading the original version. And the Google ones are a patchwork of machine-translated nonsense, "powered by Google Cloud Translation API"
Narishma
Mobile Wikipedia to normal Wikipedia.
snthd
The discontinued HTTPS Everywhere is the same thing, just that it came with a default https flavoured ruleset.
LargoLasskhyfv
There is also https://libredirect.github.io
aspenmayer
Also available from same dev on a non-GH host:
altairprime
Safari users, Redirect Web is in the app store for this.
Sadly late 2021 the original dev passed away. Someone has taken over stewardship of the project but it is currently moving slowly and they are seeking more contributors (javascript skills are a plus).
He was a bit of a hn user and seemed good natured and pleasant. Though I didn't know him I was sad to hear he'd passed both as a Redirector user and a fan of good people doing good things. I know he'd mentioned being happy to get recognition on here. https://news.ycombinator.com/user?id=einaregilsson
I really enjoyed the original devs write up on creating an easter egg specifically targeting Mark Hamills avatar in game. https://einaregilsson.com/an-easter-egg-for-one-user-luke-sk... https://news.ycombinator.com/item?id=30715746