In NZ, prostitution has been legal, and as a result, safe, for around five years. Our biggest problem is moralistic city councils trying to abuse planning law to prevent people running brothels - something they have fortunately failed at. See wikipedia for details.
Trafficking, and illegal prostitution, will occur even when prostitution is legal.
The difference in legal prostitution is that it will offer protection from the state and will reduce, but not stop, sex trafficking. There is increasing EU-wide cooperation between police forces on this subject, but it is a fairly new type of crime fighting. But at least efforts and time can be increasingly concentrated on this subject when prostitution is legalised, instead of wasting time on the ideological pursuit of eradicating sex workers altogether...