Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming links in firefox history due to domain name change

Tags:

firefox

I have a lot of links in my history to sites I regularly use. Example:

https://foo.example.org/1234 https://foo.example.org/5678

Now the site moved. I'd like to be able to access all those sites through my address bar as I am used to. AFAIK that means I have to change the links in the history to ...

https://bar.example.org/1234 https://bar.example.org/5678

  1. Is there a way to realize that?
  2. Is there a way to realize it via a) firefox GUI, b) text editor, c) another tool?
like image 355
CH_ Avatar asked Sep 02 '25 10:09

CH_


1 Answers

These two commands on Linux enough to replace domain in Firefox:

sqlite3 places.sqlite "DELETE FROM moz_origins WHERE host = 'old.domain.tld';"

sqlite3 places.sqlite "UPDATE moz_places 
                       SET url=REPLACE(moz_places.url, 'old.domain.tld', 'new.domain.tld')   
                       WHERE moz_places.url 
                       LIKE '%old.domain.tld%'"

where places.sqlite is a file in Firefox profile folder and sqlite3 is command line took can be installed by apt install sqlite3

like image 99
Oleg Neumyvakin Avatar answered Sep 06 '25 23:09

Oleg Neumyvakin