Do as I say, not as I do often used to imply hypocrisy. The saying is recorded from the 11th century, and the idea is echoed in Matthew 23:3, ‘Do not ye after their works: for they say, and do not.’
do as you would be done by a pithier form of do unto others as you would they should do unto you, recorded from the late 16th century. In Charles Kingsley's The Water-Babies (1863), Mrs Doasyouwouldbedoneby is the motherly and benevolent figure who is contrasted with her stern sister, Mrs Bedonebyasyoudid.
do right and fear no man advice setting out the reward of moral behaviour, recorded from the mid 15th century.
do unto others as you would they should do unto you traditional recommendation for setting standards of behaviour, recorded from the early 10th century, and often with biblical allusion to Luke 6:31, ‘As ye would that men should do to you, do ye also to them likewise.’ Compare do as you would be done by.