A better strategy is to first move a small part of it out of the system. And not go for a complete rewrite. And then make sure the old system can work as a proxy for the new system, or vice versa.
When both can be used simultaneously you can now gradually move from one to the other, or revert back as needed.
This is what I followed.