src/Route.php
public static function getRouteChangeUrl($uri, $params = '')
    {

        list($changeUrl, $params) = self::parseRouteUri($uri);

        // 原始地址+参数匹配 完全匹配
        $keyMD5 = md5($changeUrl . $params);
        if (isset(self::$regularUrl['url'][$keyMD5])) {
            $rule = &self::$rule[self::$regularUrl['url'][$keyMD5]];
            self::changeGetValue($rule['params']); // 保存GET信息
            if ($rule['change_url']) {
                $url = $rule['change_url'] . $rule['suffix'];
            } else {
                $url = $rule['change_url'];
            }

        }

        // 若完全匹配不存在 则不匹配参数只匹配路径  部分匹配
        if (!isset($url)) {
            $keyMD5 = md5($changeUrl);
            if (isset(self::$regularUrl['url'][$keyMD5])) {
                $rule = &self::$rule[self::$regularUrl['url'][$keyMD5]];
                // 增加自带参数 过来 多"/"情况
                $url = '/' . ltrim(($rule['change_url'] . ($params ? '/s/' . $params : '') . $rule['suffix']), '/');

            }
        }

        return isset($url) ? $url : $uri;
    }
public static function getRouteChangeUrl($uri, $params = '')
    {

        list($changeUrl, $params) = self::parseRouteUri($uri);

        // 原始地址+参数匹配 完全匹配
        $keyMD5 = md5($changeUrl . $params);
        if (isset(self::$regularUrl['url'][$keyMD5])) {
            $rule = &self::$rule[self::$regularUrl['url'][$keyMD5]];
            self::changeGetValue($rule['params']); // 保存GET信息
            if ($rule['change_url']) {
                $url = $rule['change_url'] . $rule['suffix'];
            } else {
                $url = $rule['change_url'];
            }

        }

        // 若完全匹配不存在 则不匹配参数只匹配路径  部分匹配
        if (!isset($url)) {
            $keyMD5 = md5($changeUrl);
            if (isset(self::$regularUrl['url'][$keyMD5])) {
                $rule = &self::$rule[self::$regularUrl['url'][$keyMD5]];
                // 增加自带参数 过来 多"/"情况
                $url = '/' . ltrim(($rule['change_url'] . ($params ? '/s/' . $params : '') . $rule['suffix']), '/');

            }
        }

        return isset($url) ? $url : $uri;
    }
获取改写路径