Best ways to handle redirect chains and loops