Make redirect url more dynamic