“Do not do to others what you do not want them to do to you" 
If you want an example of maxim certain to be wise, this is it: life-saving, sensible, fair, virtuous but also condition of a happier, peaceful life;
because what goes around comes around and, time given, as you saw so shall you reap.
This, the Golden Rule, is the obvious core of Axial wisdom, on which all religions agree with common sense, from Confucius to Christ to Kant, in many tongues and formulations. As the famous rabbi Hillel observed, the rest of the sacred writ  is commentary. If urged to sum up today what a civilised human being is, on one leg, in positive terms, as the old rabbi did, I would say cautiously: “Respect other people as you need to be respected.”
The Golden Rule is a matchless, elegant piece of wisdom. Confucians, Hindus, Old Egyptians, Zoroastrians, Buddhists, Jews, Christians, Moslem, all granted that this is a good thing, easy to understand and fair to do. What is called today Democracy, Human Rights, Justice, is based on the same.
In your own life, stick to this axiom in good faith and you will be of the civilised, with a chance to keep out of harm’s way. You are well advised to love your neighbour as you love yourself , because most probably, sooner or later, you will need him as he will need you. Treat you parents and your children as you wish your children to care for you later. Do not mistreat the stranger, you may become stranger among other people... If we all did this, our life would be that much less harsh, kinder and happier; if you respect the Golden Rule you are entitled to live as you let live and be helped as you help. If you do not, what right will you pretend to have?
The advent of the civilised human person, the one who understood at least a minimum from History, starts with this unnatural bet on the reciprocity of good will, thrown in the face of Nature’s survival of the strongest. (In fact, even animals seek peace and try their hoof at cooperation). Without this first step of a social contract, humans are condemned to mutual fear and hostility; an endless prisoner’s dilemma. That leads inevitably to the solitary, poor, nasty, brutish, and short life of Man wolf to man - engaged in the war of all against all described by Thomas Hobbes 
With or without the fear of God as an enforcer from above, to nourish our confidence that people will have for us the regard we have for them, speaks to our reason and to our common sense.
So far so good. Nevertheless, the Golden Rule is not as neat to apply as it to understand.
The Golden Rule is a compass not a measuring staff.
Based on it, you have a friendly North Star to orient your course, wherever we are; but it is a guide not a chain. You will know by it the wise direction. You must still decide with your own head and common sense what you do in a given situation and how far you go.
The breach of the golden rule is not that you stray from it when you must; but rather that you do not follow it when you can.
It appears that attention is fleeting while we encounter other people and nations; mysteriously, we forget that they may be very much like us beyond the differences; we fail to consider their point of view and their probable feeling and we neglect to imagine what it would do to us if we were treated in the same way. And of course they do not seem to care much for us.
Practised rigidly, as a Kantesque imperative, any variant of the golden rule is horse's blinkers, leading to unilateral weakness, utopia or to outright double-faced hypocrisy.
Remember that the Golden Rule becomes reality only as much as people practice it; it is not a law of nature.
To keep the score of reciprocity, people have four guardians of lesser nobleness who would take an eye for an eye: memory, reputation, gratitude and revenge. And laws. We do not spit in the well, for fear that we may have to draw water from it again.
To prevail by its’ obvious benefit, the Golden Rule needs time, a perspective of living together, of meeting again... sharing some minimal understanding, unquestioned values and laws. Sharing that may be called a moral sphere.
In short encounters, various hit-and-run scoundrels and idiots - when they see the golden compass at our wrist - profit of it to abuse us. Worse yet, the corrupt, do it to us “before we do it to them”  just because they lost hope in good-will and reciprocity or never had it. For those, be good but carry a stick.
The really difficult dangers arise when other people do not care at all to respect the rule. Occasionally, bad foes and maddened crowds go as far to deny us the quality of being human and the right of mutual respect.
Would you keep golden anyway, leap for faith for goodness’s sake, turn your other cheek, resign with stoicism and masochism, or will you do something against the transgressor, to stop that which is evil for your civilisation and to help the good golden rule prevail? Let me believe in my weakness that there is a justified common sense limit to one-way goodness, as non-violence should tolerate everything except its negation, violence.
How to count with people who detest the basic things that are good for you and who value things you hate? People do have different needs, like the stork from Aesop`s fable who could not eat from a shallow plate while the fox could not eat from a high jar. As people are not uniform clones, not all the same, their moral choices may differ. Reciprocity must be, generously, asymmetric; generously but mutually respected. The Golden Rule is understood and works only when translated into local language and personal meaning. Otherwise it sounds like an arrogant: “Come and live in my world, by my rule!" or worse "Let me tell you how you must live!"
What to do on the other hand with the spineless thinkers who concede that everything is relative, cultural and national, so that everything goes? Trust your judgement, I would say and be in good faith “you only understand the golden rule by living it" [5a]. You have a right to live in a coherent moral sphere even when you know that other, incompatible moral spheres exist.
And what about those paragons who come to force-feed you virtues and fair treatments which you do not want and in exchange blackmail you to reciprocate? Knock on their gift with your finger, as Nietzsche advises, they will sound empty. And tell them that today you do not buy their merchandise.
Consider then whether you and "the other" who appear to believe otherwise live in the same moral sphere; by which I understand sharing a coherent understanding of main values and obligations of being human, not beast and prey nor master and slave.
If the moral spheres are radically incompatible, the golden rule may still have a chance be enforced by honest negotiation - sometimes from a distance. Those have a right to your Golden Rule, to any rule, who obey it. Reluctantly, without giving in, you may share with incompatible moral spheres some lesser rule of mutual benefit and peace.
Even with irreducibly different values, the golden rule of reciprocity is nevertheless that of mutual respect.
This is unfortunately a kind of apartheid, like the opportunist politeness when we say hello and smile to people we loath: you suffer to let the other live by his rule, unacceptable to you, as you request him to let you live by yours, unacceptable to him. Live and let live! This arguable, fragile solution may work, provided the respectful distance and ritual of regard is mutually preserved in a kind of armistice. Sad consequences for "human rights"! Here open the gates of Hell... The arbitration may end up sooner or later in war.
Today’s mercantile world unfortunately abolished the prudent distances and cowardly borders needed for irreconcilable differences to live in peaceful mutual ignorance. As a visible result of the global short-circuit it appears at this moment that there is a cultural limit to instant globalisation. Forces not planned or measured, and which money cannot buy clash with no holds barred.
Maybe there is more than one History, parallel histories of hesitant, slow growing Civilisation, each needing their time given to time. Maybe before becoming equal, people need food and safeness and pride to their fill. Maybe tolerance without humanist education is Utopia. If you listen to Gandhi, even God must appear to the hungry in the form of bread.
Consider also some practical layers of the golden rule applicable in spite of different tastes and beliefs.
Spend some time and care to find out what other people want and detest; try to feel being them, so that you are not blinded by your point of view. That may curb your own righteousness.
Beg others, for a start, not to do to you at least what they would not have done unto them, and to their own, within their own values; that much should be easy to understand for everyone, without excuse of not being informed.
Negotiate with them, point by point, not to do to you that which you would not do to them. Draw the list of unacceptable transgressions, when they visit you or you visit them. If you are unable to conceive such a list, you may be a colonialist without knowing.
Request those things which, amazingly for them, you do not want to be done to you to be considered too. Affirm your right to be different in your own house. Those who ignore your difference should expect you to reject theirs (but this is the way of banishment and war).
Do not let others do to you what you rightly do not suffer under the false excuse that they have different beliefs, better ones. Your own absolute beliefs, good, right, beyond discussion, are not justified to be imposed on differing people in their own house. Actions are answerable but beliefs are free. If you accept other people’s right to be wrong they must too. Are you able to think like this?
Without a right to be wrong there is no golden rule.
It may be needed, as I mentioned, to establish separated private sanctuary - freedom of thought, faith and speech - for the individual and, on the other hand, public, secular territory of neutral, rule based, lawful, democratic coexistence. Such secular territory has some right to follow a land's traditions. At least this is how fairness appears to our Western civilisation. We earned with much blood and revolution a right to our sphere of justice.
It may soon become wise for the dreamers and powerful leaders of humanity to reinstate national borders as long as building one World does not work. Unfortunately, if nothing works, we must also consider that force will be the arbiter, Pandora's box is now wide open: si vis pacem para bellum. 
There may be some wisdom even in a tit-for-tat way to punish those who break the Golden Rule:
First of all, as a person or as a group react proportionally, not by all-out conflict. Try justice first. Then frank negotiation. Then borders, open but with visiting rules. It that is impossible, I dread that we may revisit History.
Those who do to you knowingly that which you would not do to them should expect to be visited an eye for an eye, not a life for an insult; an eye for an eye is the contrary of the cruel revenge some believe it to be. From Hammurabi on , it was great progress, calling for proportional compensation instead of killing each other in revenge as it was the habit of old times.
My choice looking at this mountain of real-life inconsistency is modest; to reserve my uncompromising, free-will obligation of the Golden rule to people who share reasonably my foundational values or who do not share them at all but respect them. For the rest, I do my best to navigate on track, on stormy seas.
This is my golden rule: respect all people in their difference as you request them to respect you; agree to differ!
I learned that history has successive ups and downs; I believe that all civilisations decay and fall; that barbarianism will be born ceaselessly, with each newborn, with each new generation, whereas it takes long years to grow civilised. This appeared to be true for all past civilisations.
I will still fight beastly nature and barbarianism whenever I can and apply the golden rule, whenever I can, whatever I start, for the sake of my own dignity and well-being and for beauty in my life; and my life includes the world around me, wherever I live and wherever I go. I found it true that to have friends you better be a friend; be sincere and you will encourage honesty; be polite and you build a greenhouse of politeness; respect to be respectable, smile to be smiled to and of course, give to receive.
Do not adapt to the reality of "Let the stronger win!" Live and let live!
 Confucius, Analects 15:23
 of the Tanach, the Jewish Old Testament
 “You shall love your neighbour like yourself.” (Leviticus 19:18)
 “...a time of Warre, where every man is Enemy to every man; the same is consequent to the time, wherein men live without other security, than what their own strength, and their own invention shall furnish them withall. In such condition, there is no place for Industry; because the fruit thereof is uncertain : and consequently no Culture of the Earth ; no Navigation, nor use of the commodities that may be imported by Sea ; no commodious Building ; no Instruments of moving, and removing such things as require much force ; no Knowledge of the face of the Earth; no account of Time; no Arts; no Letters; no Society ; and which is worst of all, continuall feare, and danger of violent death; And the life of man, solitary, poore, nasty, brutish, and short.” Thomas Hobbes, Leviathan, Reprinted from the edition of 1651, Clarendon Press, Oxford, 1929, Part I. Chap. 13. p 99.
 “You'd better do it to them before they do it to you!” Donna Hightower, This world is a mess, MetroLyrics.com
[5a] Wattles, Jeffrey, THE GOLDEN RULE, Oxford University Press, New York, 1996, vi
 “qui desiderat pacem, praeparet bellum” FLAVI VEGETI RENATI, EPITOMA REI MILITARIS, recensuit CAROLVS LANG, Lipsiae : in aedibus B.G. Teubneri, 1841 p. 65
 The code of Hammurabi writes, precursor to the Law of the Talion: "196. If a man destroy the eye of a man (gentleman), they shall destroy his eye." THE CODE OF HAMMURABI, P. Handcock (ed), The MACMILLAN Company, New York,
1920, p 33