Wednesday, October 17, 2012

Routing Issue

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

No comments: