In both cases:
- it was promised to take 6-9 months, and ended up taking 3-4 years
- it never really finished, the old software had to remain in production (along with the new "rewrite")
- in some form or the other, while the rewrite was happening, the company lost its customer focus and/or its ability to innovate
- good people left
Instead of rewrites, make incremental changes. The eng. team should never be off doing its own thing.
Also, a good lesson from Facebook: instead of rewriting their PHP codebase, they extended the language by creating the "PHP++" language Hack (along with the HHVM runtime), and incrementally changed their codebase to take advantage of Hack: