gonyuu wrote:
I've been having some troubles myself with the latest controller. Firstly,
it seems you must provide a RewriteRouter, else an exception will be caught
and a "404" error will display, defaulting to the noRouteAction(). So:
$route = new Zend_Controller_RewriteRouter();
$ctrl = Zend_Controller_Front::getInstance();
$ctrl->setRouter($route);
$ctrl->run('/path/to/controller');
From here, I assumed that RewriteRouter's included 'default' or 'compat'
routes would take care of the basic routing for :controller/:action, but all
of my routes get sent to index/index for whatever URL I supply.
Could someone help us out with this? Or point us to where there is
documentation on the changes that've been committed?
$route = new Zend_Controller_RewriteRouter();
Now provide a rewrite base which was probably incorrectly detected with your setup.
Set it to a slash '/' if you run from root dir or a '/subdir' if you run your app
from within a webserver subdirectory:
$route->setRewriteBase('/');
$ctrl = Zend_Controller_Front::getInstance();
$ctrl->setRouter($route);
$ctrl->run('/path/to/controller');
--
Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] |
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Idleness is not doing nothing. Idleness is being free to do anything." --
Floyd Dell