redirect to the appropriate url