Smart redirect logic (and agnostic URLs!)