Zend certified PHP/Magento developer

Make Chrome replace one domain with another when visiting URLs [duplicate]

I am using Google Chrome on Windows 10 Pro 64-bit.

I would like a certain domain to be redirected automatically to a different domain. (Specifically, I want any twitter.com link to open with nitter.net instead, since Twitter now has “enforced sign-in” popups that prevent anonymous reading.)

  • I don’t want to do it by IP address, because the “source” IP might change in the future. So I believe that rules out the “hosts file” (as discussed here:
    How do I redirect a domain to another domain locally?).
  • It’s not just a domain redirect: I need to preserve the rest of the URL, so e.g. https://twitter.com/TheUser/1234 goes to https://nitter.net/TheUser/1234.
  • Retyping the URL is not convenient since these links are very commonly encountered, and often clicked with the mouse.

Is this redirection possible, in Chrome or indeed any other browser? How can it be achieved?