This Bible contradiction is from the Skeptic's Annotated Bible.
By smiting it.
Exodus 17:5 View context
And the LORD said unto Moses, Go on before the people, and take with thee of the elders of Israel; and thy rod, wherewith thou smotest the river, take in thine hand, and go.
By talking to it.
Numbers 20:7-8 View context
And the LORD spake unto Moses, saying,
Take the rod, and gather thou the assembly together, thou, and Aaron thy brother, and speak ye unto the rock before their eyes; and it shall give forth his water, and thou shalt bring forth to them water out of the rock: so thou shalt give the congregation and their beasts drink.