Zend_Controller_Router_Route_Regex rewrite all my module links

Deadly 提交于 2019-12-13 05:13:29

问题


I'm using Zend_Framework 1. In my Bootstrap.php I rewrite my categories link something like that:

$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);

The problem is that all my admin links (a module I use) are now enter this condition. Is there any way to apply this condition only to module: default without rewrite all my admin links? Thanks

来源:https://stackoverflow.com/questions/21331059/zend-controller-router-route-regex-rewrite-all-my-module-links

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!