开发者

Zend redirect problem

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜