I have a controller, and I have several aliases for a single function in it.
eg:
Router::connect(
'/controllerX/:method',
array('controller' => 'controllerX', 'action' => 'bigApple'),
array('method'=>'help|ask|read', pass => array(method))
);
Now, for some reason(don’t ask..) I want to keep the original methods in the controller, but I don’t want them to be available for direct access.
Meaning: in the controller there will be functions named: ask,help, and read, but they won’t be accessible for direct call.
if someone will enter the url /controllerX/ask, or /controllerX/help, i want him to be routed to somewhere else.
is it possible at all?
(it seems like an endless loop..)
I think in your case, you have to do a check before and redirect to Controller:: setAction
Checkout:
http://api.cakephp.org/class/controller#method-ControllersetAction