Use the correct status code in the redirect handler