Sorry I might not have wrote it up wrong.
I want to redirect any un-auth person attempting to access something they should not be directed to users/login. So if they are trying to access an admin / manage / editor area no matter what the prefix to send them to users/login. From: [email protected] [mailto:[email protected]] On Behalf Of Vanja Dizdarevic Sent: Friday, October 19, 2012 3:18 AM To: [email protected] Subject: Re: Routing Issue Router::connect('/users/login', array('controller'=>'users', 'action'=>'login', 'prefix'=>'admin')); All users will login through the admin_login function, from which you could redirect them to the proper prefix (manager), although I didn't test this. On Thursday, October 18, 2012 7:21:34 AM UTC+2, advantage+ wrote: I have 3 different Admin routes defined. admin / manager / editor Now just testing a few things, so not logged in I try to access a restricted admin url. But it redirects me to {url}/admin/users/login How can I get it so it redirects to {url}/users/login? I need to drop the admin, or other possible defined admin routes In AppController: 'loginAction' => array('controller' => 'users','action' => 'login', 'admin' => false) In the controller: public function beforeFilter() { parent::beforeFilter(); $this->Auth->deny(); $this->Auth->redirect(); } Any ideas where I am going wrong? Thanks, Dave -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en.
