Ok, I solved.
I'll post my solution in case will help somebody in the future
$route = new Zend_Controller_Router_Route_Regex(
'staticword-(.+)\.html',
array(
'module' => 'default',
'controller' => 'search',
'action' => 'index',
'lang' => ''
)
);
http://framework.zend.com/manual/en/zend.controller.router.html
Sergio Rinaudo
From: [email protected]
To: [email protected]
Date: Sun, 26 Jul 2009 01:44:49 +0200
Subject: [fw-general] Routing question
Hi,
I want to make this kind of route:
www.mysite.com/staticword-dynamicword.html
where 'dynamicword' will be a variable.
I tried do make this route without success, I always get an 'Invalid controller
specified' exception.
My test was with this code
$route = new Zend_Controller_Router_Route_Static(
'staticword-*.html',
array(
'module' => 'default',
'controller' => 'search',
'action' => 'index',
'lang' => ''
)
);
$router->addRoute('routeTest', $route);
$front->setRouter($router);
and also with
$route = new Zend_Controller_Router_Route_Static(
'staticword-:variable.html',
array(
'module' => 'default',
'controller' => 'search',
'action' => 'index',
'lang' => ''
)
);
$router->addRoute('routeTest', $route);
$front->setRouter($router);
Any advices are very appreciated.
Thank you
Sergio Rinaudo
Con Windows Live, puoi organizzare, modificare e condividere le tue foto.
_________________________________________________________________
Con Windows Live, puoi organizzare, modificare e condividere le tue foto.
http://www.microsoft.com/italy/windows/windowslive/products/photo-gallery-edit.aspx