Search and replace
From MoodleDocs
Admins can search and replace text e.g. a URL in their Moodle database at http://yourmoodlesite.org/admin/replace.php. A database backup is recommended before running the search and replace ;-)
BUT : content of the html blocks are encoded in configdata field (block_instance table). So admin/replace.php doesn't change internal links there. Please refer to these messages :