Fix redirects 301/302

Also handle Atom better

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>