“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 good 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, ought to be based on the same to be sustainable.
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. Be nice to your neighbours and to aliens, in time your life will better. Do not calculate instead what they may actually do. 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 whenever you can, you are entitled to live as you let live and be helped as you help. If you do not, what honest right will you pretend to have?
The advent of the civilised human person, the one who understood at least a minimum from human History, starts with this unnatural bet on the reciprocity of good will, thrown into 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 logical-mathematical abomination of the Golden Rule which is in fact nothing more than a Machiavellian opinion about the world disguised in the cloth of science. That view 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 in principle.
The Golden Rule is a compass not a measuring staff. It shows direction and goal, up there in the skies of principle and attitude, not an itinerary, nor a plan.
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 way of conduct. You must still decide with your own head and good sense what you do in a given situation and how far you go.
Your 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.
In practice, 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; busy, 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. If we do not spit in the well, it is 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. It pre-supposes that ultimately, we all share the same values because there is only one hierarchy of the values leading to the human Good.
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 and the fanatic, 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 real dangers arise when other people do not care at all to respect the rule with you. Occasionally, bad foes and maddened crowds go as far as to deny us the quality of being human equally with them and the right of mutual respect.
Would you keep golden anyway, leap for faith for goodness’s sake, sacrifice, 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? Will you fight for the golden rule to prevail? Would you find ways to educate the other party? Let me believe in my weakness that there is a justified common sense mix of hope and 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 exchangeable clones, not all the same, their moral choices may differ, because their view of the world is from some angle radically different from yours. Reciprocity must be then, wisely, asymmetric; generously but with mutually respected particulars. 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 and values!" or worse "Let me tell you how things are and how you must live!"
What to do on the other hand with the spineless thinkers and hypocrites who concede that everything is relative, cultural, evolving 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 and acknowledge that other, incompatible moral spheres exist. Recent discussions of "plurality" investigate the practical modus vivendi for this.
And what about those paragons who come to force-feed you virtues, rules 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 also whether you and "the other" who appear to believe otherwise live in the same moral sphere; by which I understand sharing a coherent and compatible understanding of main values and obligations of being human, not split worlds of 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 acknowledging irreducible plurality. Those have a right to your Golden Rule, to any rule, who obey it but alien lands do have incommensurable laws. Reluctantly, without giving in, you may share the planet with incompatible moral spheres by means of some lesser or higher, abstracted rule of mutual benefit and peace.
Even with irreducibly different values, in a world of plurality, the golden rule of reciprocity may apply to mutual respect. You deserve respect as much as you respect.
This is unfortunately a kind of apartheid, like the opportunist politeness when we say hello and smile to disreputable people we loath: you suffer to let the other - unacceptable to you - live by his rule and in exchange, you require them to let you live by yours, unacceptable to them. Live and let live on a knife's edge! This arguable, fragile solution may work, provided the respectful distance and ritual of regard is mutually preserved in a kind of armistice of powers present. Sad consequences for "human rights"! Here open the gates of Hell... The government of such a world which is ceaseless arbitration may founder sooner or later in war.
Today’s unfettered mercantile world unfortunately abolished the prudent distances and cowardly borders needed for irreconcilable differences to live in convenient mutual ignorance. Intelligent fools resolved that there is only one world which must grow all the same finally into one homogeneous nation called humanity. As a visible reaction of the global short-circuit in communications and travel, gives the lie to this monist creed. It appears at this beginning of century that there is a cultural limit to instant globalisation. Forces not planned or measured, and which money cannot buy, clash with no holds barred and no shared reason to regulate them.
Maybe there is more than one History, parallel histories of hesitant, slow growing Civilisation, each civilisation needing their time given to time. Maybe before becoming equal, people need food and safeness and pride to their fill. If you listen to Gandhi, even God must appear to the hungry in the form of bread. Maybe bread is not enough...
Maybe tolerance without humanist education is Utopia.
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 promise that you would not do to them. Draw the list of unacceptable transgressions, when they visit you or you visit them. Clarify the notion of being a guest, all nations have a tradition of this. If you are unable to conceive such a list of obligations, you may be a colonialist without knowing.
Affirm explicitly and request those things which, amazingly for a different country, nation, culture or community, 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 (and 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, at least in the part of the world where I live. We all have the freedom of thought and of faith, in truth or in error. If you accept other people’s right to be wrong they must too. Are you able to think like this? If not, how to apply the Golden Rule?
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