for redirect, use 307 (temporary) rather than 301 (permanent)