WordPress url transformation script

The pro version of “Duplicator” should be able to handle that. I remeber to have used that once for a situation similar to what you describe.