in islam you need 4 witnesses (who saw the whole thing happen) in order to prove that you were r*ped otherwise the woman will be punished
I recently read about an old case where a woman was raped & she got pregnant and when she reported the rape to police, she was acccused of adultery and sentenced her to death by stoning.
she was released later on public pressure but the rule is still there & it's so frustrating that people believe it is such a divine rule. there are islamic scholars who have explained technicalities regarding this rule like the witnesses should be men and they must have seen the actual penetration happening too otherwise rape allegation should not be accepted and the woman would be to blame.
the case i referred was of zafran bibi in pakistan, in case anyone wants to look it up