Answer :

There is no (as far as I know) way to turn a rocket you're not in control of using mechanical methods. The best way would be (if it's a heat seeking missile for instance) to use flares to lure it somewhere else.

If the rocket is controlled by a computer, it is hypothetically possible to take control of the rocket; however, because of the security, this is about as hard as trying to finding the key of some well encrypted message : it's nearly impossible.