Zend redirect issue

I am trying to redirect to

http://localhost/site/public/admin/login

      

from

http://localhost/site/public

      

but for some reason it redirects to

http://localhost/admin/login

      

The code I use is:

$this->_response->setRedirect('/admin/login')->sendResponse(); 

      

This is really frustrating for me and any help would be grealy ok

+2


a source to share


3 answers


try this:



$ this -> _ response-> setRedirect ('admin / Login') -> SendResponse ();

+2


a source


For those who stumbled upon this issue. this can help. actually ran into this same problem and found this and it worked for me. Greetings



+1


a source


I am assuming this is in the context of the controller.

If so, use the Redirector helper

return $this->_helper->redirector('login', 'admin');

      

0


a source







All Articles