Well, You say random, but there are only so many root directories.
so I would do this. % cat orig.html |sed "s/\home//g" |sed "/\/local//g" > new.html. Keep piping it through sed to search and replace all occurances. Or you can write a while loop in perl and do the same, one line at a time.
#!/usr/bin/perl
while(<>){
$_=~s/^.*?\/home//g;
print $_;
}
|