A website that I visit often has changed its domain name (old.example.com -> new.example.com). How can I easily rewrite all entries in Firefox's history and sessions (active tabs), as if the website was always using the new domain instead of the old one? You may assume that Sync is not enabled.
My situation is similar to Remove URLs by domain from Firefox history and awesome bar. That accepted answer is insufficient, because it only explains how to delete the items, while I want to know how to rewrite the items. And that the question does not even mention rewriting of active tabs (I have dozens of such tabs, spread across tab groups).