This works for me in Module.php:

$target         = $e->getTarget();
return $target->redirect()->toUrl('/auth/login');

where $e is the event.



Gina-Marie Rollock
Software Developer
Network Technology Solutions
Office  119 East Jackson Street, Thomasville, GA 31792
Phone 229.584.2006   Fax 229.226.2495
Email  [email protected] 
Web  http://www.ntsnetworks.com


-----Original Message-----
From: Arvind Jha [mailto:[email protected]] 
Sent: Friday, January 16, 2015 8:40 AM
To: [email protected]
Subject: [fw-general] Re: How to use redirect() outside controller in zend 2

Thanks for the respose

Actually, I'm working on an ACL which is called in Module.php and attached to 
the bootstrap.

Obviously the ACL restricts access to certain areas of the site, which brings 
the need for redirects. 



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/How-to-use-redirect-outside-controller-in-zend-2-tp4662425p4662427.html
Sent from the Zend Framework mailing list archive at Nabble.com.

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]






--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to