Prostitution itself is not illegal in Sri Lanka, however, soliciting and running brothels is an offence under the vagrants ordinance and the brothels ordinance. It is also illegal to procure and traffic persons for prostitution. Prostitution has not become as severe a problem in Sri Lanka as in some neighboring countries.
References
Prostitution in Sri Lanka Wikipedia(Text) CC BY-SA