Zend framework Zend_控制器_路由器_路由_正则表达式重写所有模块链接

Zend framework Zend_控制器_路由器_路由_正则表达式重写所有模块链接,zend-framework,zend-route,zend-router,Zend Framework,Zend Route,Zend Router,我使用的是Zend_框架1。在我的Bootstrap.php中,我重写了我的类别链接,如下所示: $route = new Zend_Controller_Router_Route_Regex("^([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/date/|)([a-z]*)(/page/|)([0-9]*)$", array( "

我使用的是Zend_框架1。在我的Bootstrap.php中,我重写了我的类别链接,如下所示:

$route = new Zend_Controller_Router_Route_Regex("^([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/date/|)([a-z]*)(/page/|)([0-9]*)$",
        array(
           "module" => "default",
           "controller" => "categories",
           "action" => "index"
        ), 
        array(
                1 => 'firstparam',
                3 => 'secondparam',
                5 => 'theeparam',
                7 => 'fourparam',
                9 => 'fiveparam',
                11 => 'date',
                13 => 'page',

            )
    );
    $router->addRoute("RouteCategories", $route);

问题是我所有的管理员链接(我使用的模块)现在都进入了这个状态。有没有办法只将此条件应用于module:default而不重写所有我的管理链接?谢谢

我建议您为您的类别URL添加前缀。示例:
$route=new Zend_Controller_Router_route_Regex(“^category-([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/|)([a-z,0-9,-]*)(/date/|)([a-z]*)([a-z]*)(/page/|)([0-9,-*))([a-z]*)(/page/|)([0-9]$)”)感谢客户,但他没有接受这个解决方案。但他确实接受了