Check whether the previous url exists