When I call:
$this->_redirect($url, array('code'=>301));
I get redirected, but the http code is 302 instead of 301. Any idea why?
It appears that using the _redirect method will always set the code to a 302. If you'd like to manually change the response code, use a redirector instead.