Another version of redirect. Simpler, with some tests.