Hi, this is my app_controller
class AppController extends Controller
{
var $components = array('DebugKit.Toolbar', 'Auth', 'Session',
'Facebook.Connect');
var $helpers = array('Facebook.Facebook');
function beforeFilter()
{
$this->Auth->allow(array('books' => 'index'));
$this->Auth->allow(array('books' => 'details'));
$this->Auth->allow(array('authors' => 'index'));
$this->Auth->allow(array('authors' => 'details'));
$this->Auth->allow(array('users' => 'collection'));
$this->Auth->allow(array('users' => 'register'));
$this->Auth->logoutRedirect = array('controller' =>
'books', 'action' => 'index');
$this->Auth->loginRedirect = array('controller' =>
'books', 'action' => 'index');
}
}
This is routes config
Router::connect(
'/:username/collection',
array('controller' => 'Users', 'action' => 'collection'),
array('pass' => array('username'))
);
Router::connect(
'/author/:slug',
array('controller' => 'Authors', 'action' => 'details'),
array('pass' => array('slug'))
);
Router::connect(
'/book/:slug',
array('controller' => 'Books', 'action' => 'details'),
array('pass' => array('slug'))
);
now mysite.com/author/stephen_king or mysite.com/book/the_green_mile
works perfectly. But if I call mysite.com/books or mysite.com/books/
index I will be forwarded to login page. Why???
The only allowed action are details action (that are routed under
different form)
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en