One of the misconceptions towards Islam is that a rape victim gets punished, while the rapist gets unpunished and can walk away free. It is assumed by some that men in Islam can commit rape with impunity. Another lie anti-Muslim propagandists spread is that a victim who has been raped has to produce four witnesses in order for the rapist to get convicted and punished.
Critics have never produced any evidence, either from the Quran or Hadith anywhere indicating that there has to be four eye-witnesses for a rapist to get punished. The only time when there has to be four eye-witnesses needed is for adultery, and this is practically impossible to convict anyone with.
The Prophet (p) stoned a man who had raped a woman. This is reported in Jami` at-Tirmidhi. The chapter of the narration goes like, “woman who is forced To commit adultery” i.e., rape:
“A women went out during the time of the Prophet to go to Salat, but she was caught by a man and he had relations with her, so she screamed and he left. Then a man came across her and she said: ‘That man has done this and that to me’, then she came across a group of Emigrants (Muhajirin) and she said: ‘
That man did this and that to me.’ They went to get the man she thought had relations with her, and they brought him to her. She said: ‘Yes, that’s him.’ So they brought him to the Messenger of Allah, and when he ordered that he be stoned, the man who had relations with her, said: ‘O Messenger of Allah, I am the one who had relations with her.’
So he said to her: ‘Go, for Allah has forgiven you.’ Then he said some nice words to the man (who was brought). And he said to the man who had relations with her: ‘Stone him.’ Then he said: ‘He has repented a repentance that, if the inhabitants of Al-Madinah had repented with, it would have been accepted from them.’” (Jami’ at-Tirmidhi volume 3, Book 15, Hadith 1454 [Hadith is Hasan – Darrusalaam])
In is reported in Muwatta Imam Malik that a slave who was in charge of other slaves, he forced a slave-girl among the slaves who he was in charge of, he had forced intercourse with her. When the companion of Prophet Muhammad (p), Umar Ibn Khattab found out what had happened, he had the slave who raped the girl to be flogged and the victim walk away without getting punished:
Malik related to me from Nafi that a slave was in charge of the slaves in the khumus and he forced a slave-girl among those slaves against her will and had intercourse with her. Umar ibn al-Khattab had him flogged and banished him, and he did not flog the slave-girl because the slave had forced her. (Muwatta Imam Malik: Hudud: Book 41, Hadith 15)
As we see from the Hadith already shown, it’s evident that a victim does not get punished. The assumption by Anti-Islam evil mischief makers that the victim gets flogged because she reports been raped is false. The only person that gets punished if found to be guilty, is the rapist. In another hadith the head of State, the ruler of the Muslims Abd al-Malik ibn Marwan (5th Caliph) gave judgement on a rapist:
Malik related to me from Ibn Shihab that Abd al-Malik ibn Marwan gave a judgement that the rapist had to pay the raped woman her bride- price. Yahya said that he heard Malik say, “What is done in our community about the man who rapes a woman, virgin or non-virgin, if she is free, is that he must pay the bride-price of the like of her.
If she is a slave, he must pay what he has diminished of her worth. The hadd-punishment in such cases is applied to the rapist, and there is no punishment applied to the raped woman.” (Muwatta Imam Malik Judgements: Book 36, Hadith 14)
From the above authentic Ahadith, we see clear evidence that the rapist gets punished and there is no punishment for the victim. You would have also noticed in the above Hadith that the rapist had to pay compensation to the victim.
Oliver Leaman who is a Professor of Philosophy and Zantker Professor of Judaic Studies at the University of Kentucky reiterates what I mentioned at the start of this article that the only time when there is four witnesses needed is for adultery:
“Critics also point to the lack of equal protection for victims of rape in Muslim countries that follow Sharia. They allege that it is impossible to prove rape. For purposes of this discussion, it is important to note that the Sharia makes a distinction between adultery and rape and applies different rules.
As the Quran clearly states, the proof that adultery has occurred requires four eye-witnesses to the act, which must have been committed by a man and a woman not validly married to one another, and the act must have been wilfully committed by consenting adults. Proof can also be determined by a confession.
But this confession must be voluntary, and based on legal counsel; it must be repeated on four separate occasions, and made by a person who is sane. Furthermore, those who bring a charge of adultery against an individual must provide four eye-witnesses. Otherwise, the accuser is then accorded a sentence for defamation (which means flogging or a prison sentence), and his or her testimony is excluded in all future court cases.
Thus it is clear that the required testimony of four male witnesses having seen the actual penetration applies to illicit sexual relations, not to rape. The requirements for proof of rape are less stringent.
Rape charges can be brought and a case proven based on the sole testimony of the victim, providing that circumstantial evidence supports the allegations. It is these strict criteria of proof which leads to the frequent observation that where injustice against women does occur, it is not because of Islamic law. It happens either due to misinterpretation of the intricacies of the Sharia laws governing these matters, or a cultural traditions; or due to corruption and blatant disregard of the law, or indeed some combination of these phenomena.”
It is evident from the time of Prophet Muhammad (p), all the way to the followers of the companions, that they have always punished those who had forced intercourse with a woman. The assumption by critics that there has to be four witnesses in order for a rapist to get convicted is outright lie, as shown already. Four witnesses are not needed when it comes to rape, the only time four witnesses are needed is for adultery. In light of the evidences shown Islam forbids rape, and anyone found to be engaged in such under Islamic law, would be punished severely.    
“Yemeni man publicly executed for raping and murdering four-year-old girl as crowd film on smartphones” (* *) August 2017 (The Independent)
() – In Pakistan, a rapist was arrested and convicted on the bases of DNA alone:
“Police had confirmed on January 13 that the results of DNA tests carried out in the wake of the rape and murder of Zainab in Kasur indicated the involvement of one culprit in at least seven similar cases that occurred in the district over the past year.” – (“‘Zainab’s murderer has been arrested’”, 23rd January 2018, https://www.dawn.com/news/1384759/zainabs-murderer-has-been-arrested )
() – “Documentary: Why Do Haryana’s Old & Young Blame Women for Rape?” (Haryana) (7th April 2018) https://www.thequint.com/videos/documentaries/rape-is-consensual-inside-haryanas-rape-culture
Credit to Discover the truth
 Controversies in Contemporary Islam by Professor Oliver Leaman page 78
 In the following case is of a slave where she was forced to have sexual relations with a man. The criminal was punished, and the victim let go:
“A slave woman who had been forced by a slave man to commit Zina (adultery) were brought to Umar. He beat the man and did not beat the woman.”(Al-Sunan al-Kubra, by al-Bayhaqi, volume 8, page 35. See also, al-Mughni, volume 12, page 217)
 A woman was sleeping when she woke up to find out that a man was on top of her. She was let go, since she was innocent:
“A woman who had committed Zina (adultery) was brought to Umar and she said: ‘I was sleeping and when I woke up there was a man on top of me.’ He let her go and did not beat her.” (Al-Sunan al-Kubra, volume 8, page 236. See also, al-Mughni, volume 12, page 218)
 Here is a case with Abu Bakr Siddique the first Caliph of Islam, 1400 years ago how he dealt with a rapist and the victim:
أخبرنا عبد الرزاق قال : أخبرنا عبيد الله بن عمر ، عن نافع قال جاء رجل إلى أبي بكر فذكر له ، أن ضيفا له افتض أخته استكرهها على نفسها ، فسأله فاعترف بذلك ، فضربه أبو بكر الحد ، ونفاه سنة إلى فدك ، ولم يضربها ، ولم ينفها لأنه استكرهها ، ثم زوجها إياه أبو بكر ، وأدخله عليها
“A man came to Abu Bakr and told him that one of his guests had coerced, and deflowered his sister. The man was asked about that, and confessed to it. Abu Bakr flogged him with the hadd, and banished him for a year to Fadak. And he did not flog or banish her, because she was forced.” (Musannaf Abd al-Razzaq, by Abd al-Razzaq al-Sanani (d. 826 CE), Hadith number, 12796, online source, https://library.islamweb.net/NewLibrary/display_book.php?bk_no=73&ID=1476&idfrom=12219&idto=12238&bookid=73&startno=10 )
 An incident in Umar Ibn al-Khattab’s life time:
“Narrated by Ibn Umar that a man was brought to Umar ibn al-khattab (the second caliph of Islam) , who forced a woman to be involved in fornication with him (i.e. raped her). He (`Umar) said: “It is not for this that we have a (peace) treaty with you people! ‟ And he commanded that he was (to be crucified) and he was crucified in Baytul-Maqdas (Jerusalem).” (Mussanaf – Ibn Abi Shaybah volume 11, page 85, Grade, Hasan)