The spirit of the rule vs literal wordingThe simple formulations used in religious scriptures and ancient secular philosophy works just fine, but only as long as you stick to the spirit of the rule. If you go with a literal interpretation and apply enough Insane Troll Logic while refusing to think any further, you can twist the formulations any way you want to.
The Golden Rule in philosophyFor the spirit of The Golden Rule to work in the more theoretical thinking of modern philosophy, it needed to be upgraded to a more advanced formulation. Immanuel Kant was the philosopher who took on this project, developing formulations designed to be more foolproof.
Do no harm - The Silver RuleThe Golden Rule is related to the principle that one should do no harm so that others don't harm you. This principle is sometimes referred to as The Silver Rule. There is some overlap: The Golden Rule also covers The Silver Rule to some extent, but isn't limited to it. Also, there are those who would argue that the negative formulations cover only the silver rule. (Thus twisting the spirit of the rule, see above.) Or simply claim that the title of "golden rule" should be reserved for formulations used by their own philosophy or religion, while any formulation used by any other philosophy or religion should by definition be demoted to "silver" status. The Silver Rule is the core of The Hippocratic Oath. It is also closely related to negative utilitarianism, the philosophy that we should only consider lessening the amount suffering, not happiness. Note that the Silver Rule is only partially covered by the Golden Rule, regardless of formulation: A negative formulation of The Golden Rule doesn't say that you should never hurt or sacrifice people, it says that you should only do so when they would agree that it's justified.
The worldview problemEven with the advanced philosophical formulations, The Golden Rule only works if everyone involved can agree on the basics. For example, everyone except the most extreme Nazis agree that Jews, Homosexuals and the mentally handicapped are fellow human beings. Thus we won't accept their claims that the Holocaust was compatible with The Golden Rule (not that all, or even most, Nazi's advanced The Golden Rule in the first place of course). However, everyone except the most extreme Animal Wrongs Group agree that pigs, dogs and cows are not fellow human beings. Thus their claims that we all break The Golden Rule just as badly as the Nazis falls on deaf ears. Obviously, Flame Wars can result from this, as various radicals try to convince you that your definition of "humanity" is inaccurate and you do the same to them. The only surefire way to defuse this (aside from Brainwashing) is to Agree to Disagree: everyone has to recognize that "I have my beliefs, and you have yours." See strawman #4 above.
The Golden Rule in Christianity and JudaismWhile most people associate Christianity's take on The Golden Rule with Jesus' Sermon On The Mount, the principle is deeply rooted in the Old Testament as well. The law of Moses include "Love your neighbor as yourself", and in the new testament Jesus highlights this as the second most important commandment in the law (dwarfed only by the law to love God with all your heart * .) Apocrypha such as Tobit includes outright formulations of The Golden Rule. Also, the rule "An Eye For An Eye, a tooth for a tooth" can be interpreted as a rule of mercy, and thus related to The Golden Rule: Eschew Disproportionate Retribution, don't hurt your enemies more then they have already hurt you." The Talmud states that the golden rule is "the greatest rule in the Torah".
The Golden Rule in Islam and Ba'haiThere are many references to The Golden Rule in scriptures unique to Islam, and it should be noted that the old testament of the Bible as well as Jesus' sermon on the mount in the new testament counts as holy in Islam. (Moslems believe in Jesus, it's just that they consider him a mortal prophet of God - and thus feel that Christians insult Jesus when they claim that he is God.) In Islam, Muhammed is considered the most important prophet because he was the last prophet. Ba'hai takes the same train of thought one step further, claiming that Muhammed was actually only the last prophet until the next prophet, and that there will always be new prophets. Perhaps more focused on The Golden Rule then any other abrahamitic religion, Ba'hai highlights the rule as a common ground for all prophets. They thus consider the struggle against racism, sexism et cetera to be one of the most important ways of doing God's will. Many individual Jewish, Christian and Muslim congregations takes the same stand: What makes Ba'hai unique is that the entire religion highlights The Golden Rule in this way.
The Golden Rule in Buddhism and HinduismThese religions believe in The Golden Rule not only as a law or moral principle, but also as an unstoppable force of nature. Karma works in mysterious ways, and all the good and bad things we do to others will come back to us – if not in this life, then in the next one. Likewise, whatever happens to us now is a reflection of how we treated others in the past. If we are fortunate enough to be born to kind and affluent parents that give us a good childhood, then that's because we treated others well in the previous lifetime. But if we squander this reward on a selfish lifestyle, then we won't do so well the next time.