Resolves infinit loop redirects.