Treat others as you'd want to be treated yourself.
"Treat others how they want to be treated" is a better doctrine, because you might have a low opinion of yourself and it'd be pretty rubbish to project that on to other people.
but at least you know how you want to be treated. "treat others as they want to be treated"-- what do i know about what they want? nothing, outside what i glean from our shared humanity... you and others becomes a distinction without a difference, and that leads back to where we started, "treat others as you would want to be treated."
This falls apart the moment some people demand special treatment, completely unwarranted, and you're supposed to—as per your doctrine—give it to them, simply because they demand it.