Watch out. If you have ever had fantasies about group sex and shared them with another person, you have forfeited your right to say no to sex and can be lawfully raped. This seems to be the judgment in a Bolton rape case at Preston crown court last week, when a woman was denied the right to have her alleged rapists put on trial.

Proceedings were stopped and five men were cleared of raping and conspiring to rape a 24-year-old Liverpool woman after it emerged that she had confided online about her group sex fantasies. She shared these fantasies with a Bolton man over the internet and then went to visit him. She says her intention was to have sex with him and with no one else. But when she arrived at his house, she was confronted by several men, some of whom allegedly raped her – though they denied doing so.

We will never know for sure what happened because the trial was halted when excerpts from the women's MSN chatlogs were produced. They showed her expressing fantasies about having an orgy. Prosecutor Michael Leeming said: "There is material in the chatlogs from the complainant, who is prepared to entertain ideas of group sex with strangers, where, to use her words, 'her morals go out of the window' … This material does paint a wholly different light as far as this case is concerned … We take the view that it would not be appropriate to offer any evidence."

Judge Robert Brown concurred. He ordered the jury to return not guilty verdicts for rape and conspiracy to rape against the five defendants, telling them: "This case depended on the complainant's credibility … Not to put too fine a point on it, her credibility was shot to pieces."

All nine media reports of this case give the same account. I presume they are accurate. If so, I am stunned that such sexist and moralistic thinking still exists in our courts in the 21st century. The judge and prosecutor appear to have come close to suggesting that the alleged victim had, by sharing her group sex fantasies, invited the rape; that given her racy sexual mores she had only herself to blame. Having heard she was open to the idea of an orgy, the five men were, it seems, entitled to believe that she was theirs for the taking. They could not be expected to restrain themselves, even after she allegedly said "no".

If this was the case, such thinking appears to be a throwback to the days when rapists sometimes escaped justice by pleading that they were provoked by the sight of a woman walking alone at night wearing a short dress or a plunging neckline. In other words, "provocative" women were to blame, not the rapists. It was often suggested in the 1970s that women should modify their behaviour to ensure they didn't tempt the uncontrollable lusts of men. Isn't this case an echo of that mentality? Based on the news reports, the decision to drop the rape charges seems to be riddled with misogyny.

When a person does not consent to sex, it is rape, regardless of their gender, social background, sexual history or erotic fantasies. No means no – and there are, or should be, no exceptions. Even if a person initially consents to sex, they have a right to change their mind and withdraw consent. Sex after a person has said "no" or "stop" is rape – regardless of the person's sexual fantasies and irrespective of whether they were previously chaste or promiscuous.

Rape is rape, period. Having an adventurous sexual appetite and being a so-called "loose" woman or man should not place a person outside the protection of the law. Yet in the Bolton case the alleged victim appears to have been judged, at least in part, by her sexual thoughts; with the implication that her mere interest in the idea of group sex rendered her immoral and not a credible witness. Unbelievable in 2010!

Whatever you think about orgies, I know of no evidence that would-be orgy participants are less honest than other people and less credible as court witnesses. How does fantasising about sex with multiple partners result in the woman's credibility being "shot to pieces", as the judge put it? Either she was raped or not. That is the issue, not her erotic daydreams and online musings. Court decisions should be based on relevant evidence, not on irrelevant MSN messages. The prosecution ought to have revolved solely on the question of whether she consented and whether a rape took place.

The woman's orgiastic fantasies and her sharing of them over the internet with a willing recipient is not a crime. She was not inviting rape. Group sex is sex with consent. Rape is not. People entertain all kinds of sexual fantasies, from sex with celebrities to SM bondage, midnight forest romps, bisexual threesomes and romantic mountain-top trysts. Such fantasies may not turn you on, but I say: live and let live. Harmless sexual imaginings should not be allowed to interfere with the dispensing of justice by our courts. If the young woman was raped, I hope she appeals and wins, for the sake of all women – and men – everywhere. Justice demands it. No means no, always.