routing is done before the redirect.