revert default redirect to 302, use API to do perm. redirect