On Mon, Dec 24, 2012 at 4:27 AM, Javier Garcia <[email protected]> wrote: > I have this redirection: > > $this->_helper->redirector('freenights/supplierId/' . $sws. '/contractId/' . > $con); > > It redirects me to this url: > http://contractlink.local/contracts/freenights/supplierId%2F3/contractId/2 > > but I get this 404 error: > > The requested URL /contracts/freenights/supplierId/3/contractId/2 was not > found on this server. > > If i don't have any problem going directly to > http://contractlink.local/contracts/freenights/supplierId/3/contractId/2, > why am I getting the 404?
Because you're using the helper incorrectly. When you use the redirector as a method, it's actually proxying to the gotoSimple() method, which expects the parameters ($action, $controller, $module, $params). What you're doing above is constructing the URL yourself; as such, you should do the following: $this->redirector->gotoUrl(...) -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
