Changes to the getRedirectPath method.