I'm trying to redirect to
http://localhost/site/public/admin/login
from
http://localhost/site/public
but for some reason, it keeps redirecting to
http://localhost/admin/login
The code I am using is:
$this->_response->setRedirect('/a开发者_开发问答dmin/login')->sendResponse();
This is really frustrating me, and any help would be grealy appreciated
try this :
$this->_response->setRedirect('admin/login')->sendResponse();
For those who stumble upon this problem. this might help. actually encountered this same problem and found this and it worked for me.Cheers
- Zend and .htaccess
I'm assuming this is within a controller context.
If so, use the Redirector helper
return $this->_helper->redirector('login', 'admin');
精彩评论