The woman, who spent three weeks in pre-trial detention, was convicted of defamation and lying.
The court ordered the woman that she could not even leave the capital, Mogadishu. A journalist who reported her story was also convicted of the same offence.
According to the BBC, the two men accused of raping the woman have not been brought before a court.
The Somali government previously said sexual violence was unacceptable.
The 19-year-old woman, who works as a journalist, accused two men from the state-run Radio Mogadishu of raping her at gunpoint, the report said.
According to the report, she gave an account of what happened in an interview with Mohamed Bashir Hashi, a journalist at the privately owned Shabelle Media Network.
The interview was videoed and posted online by Shabelle and was picked up by several Somali news websites.
But Judge Hashi Elmi Nur handed her a suspended six-month sentence for defamation and lying.
Mohamed Bashir Hashi, who had also been found guilty of defamation and lying, was sentenced to six months in jail or a fine equivalent to about one dollar per day of his sentence, the report added.
He was released from custody after paying the fine.
--ANI (Posted on 10-12-2013)