The Redirector add-on for Firefox provides pattern-based (regex and glob) URL redirection on the browser side. You can just add rules to its configuration rather than new userscripts.
I used in the past to locally correct for broken links within intranet/CI pages. E.g. something correctably wrong with a gerrit link, or whatever.