I would like to remove a request parameter from the URL that is displayed in the browser window. I am creating links with special parameters that I want to retrieve in the controller, but aren't necessary after they have been retrieved.
I tried doing this, but it did not work:
$params = $this->_getAllParams();
if (!empty($params['active-tab'])) {
//do something with $params['active-tab'] before removing it
//then...
unset($params['active-tab']);
$this->_request->setParams($params);
}
Solution:
I guess Zend_Request does not work the way I thought. Here's the solution I came up with:
$params = $this->_getAllParams();
if (!empty($params['active-tab'])) {
//do something with $params['active-tab'] before removing it
unset($params['active-tab']);
$this->_helper->redirector($params['action'], $params['controller'], $params['module'], $params);
}