We present evidence of magnetically controlled vortex motion in an Al film on top of a periodic array of Permalloy square rings. The resulting magnetic template generates a strongly anisotropic pinning potential landscape for vortices in the superconducting layer. Transport measurements show that this anisotropy is able to confine the flux motion along the high symmetry axes of the square lattice of dipoles. This guided vortex motion can be rerouted by 90 degrees simply changing the dipole orientation or even suppressed by inducing a flux-closure magnetic state with very low stray fields in the rings. (C) 2008 American Institute of Physics.