For me it depends.
I think that rewriting the 100% of the code is a crazy thing.
I'm working for some web startups, and expecially in the beginning, with really low experience, you or your fellows could create something that fit the need in that specific moment, but maybe in the future is not good, maybe haven't good scalability, or something similar.
In that case, is better rewrite.
Maybe you could save the company and learn a lot of things about that terrible experience.