Studyon Minte9.com
ZF 1.0

Study

Redirect



Utility methods

_redirect($url, array $options = array()): redirect to another location. 
This method takes a URL and an optional set of options. By default, it performs an HTTP 302 redirect.

Application/modules/default/controllers/FrontendController.php
--------------------------------------------------------------
<?php
class FrontendController extends Zend_Controller_Action {

	public function testRedirectAction() {
		$this->_redirect(_APP_URL . "/default/error/error2/message/redirect+301", array('code'=>301));
	}
}

http://zfsite/default/frontend/test-redirect
// redirect: http://zfsite/default/error/error2/message/redirect+301 (request param 'message')
// firebug/Net: Status 301 Moved Permanently


http://mysqltalk.wordpress.com/2009/07/12/important-to-note-that-zend-framework-_redirect-defaults-to-302/
http://framework.zend.com/manual/en/zend.controller.action.html