That's it, thanks!
Matthias
Luiz Vitor schrieb:
Hi Matthias
If I'm not wrong, the Routes are processed recursively, so the most
generic routes should be defined first.
You defined the "page" route dinamicaly and as last, It'll be the
first one processed and will always be used.
So try changing your routes array to this:
$routes = array(
'page' => new Zend_Controller_Router_Route(':page/*',
array('controller' => 'index', 'action' => 'index')),
'form' => new Zend_Controller_Router_Route('form/:action/*',
array('controller' => 'form', 'action' => 'index')),
'files' => new Zend_Controller_Router_Route('files/view/*',
array('controller' => 'files', 'action' => 'view'))
);
Luiz
On 12/22/06, *Matthias Zitzmann* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi folks,
yesterday I moved my application from a patched 0.1.5 to 0.6.0. There
were a few changes I need to do in my View-Class (I'm using __get and
__set, if I extend Zend_View_Abstract, this won't work any
longer). This
changes were done in about three hours. The bigger problem is,
that the
routing doesn't work any more. I also used the RewriteRouter before
that, here is some code:
$routes = array(
'form' => new
Zend_Controller_Router_Route('form/:action/*', array('controller'
=> 'form', 'action' => 'index')),
'files' => new Zend_Controller_Router_Route('files/view/*',
array('controller' => 'files', 'action' => 'view')),
'page' => new Zend_Controller_Router_Route(':page/*',
array('controller' => 'index', 'action' => 'index'))
);
$controller = Zend_Controller_Front::getInstance();
$router = new Zend_Controller_RewriteRouter();
$controller->setRouter($router);
$router->removeDefaultRoutes();
$router->addRoutes($routes);
$controller->setControllerDirectory('app/control');
$controller->dispatch();
The most curious thing is, that now anything is redirected to the
'indexAction' of the 'indexController' - 'files' and 'form', too.
Here
is my .htaccess:
RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
Does anybody get an idea? It drives me crazy ...
Greets and thanks
Matthias