How to make stack that url redirect = fail but if url stays the same its a success

So basically im tryin to work on a project and i want the outcome to be fail if im redirected to a certain url and success if im redirected to certain webpage im sure this is simple but i cant figure it out