<?
ini_set( "display_errors" , "1" );
define( "ROOT" , dirname( __FILE__ ) );
set_include_path(
"." . PATH_SEPARATOR .
ROOT."/lib".
PATH_SEPARATOR . get_include_path()
);
require_once 'Rong/Controller/Route.php';
$route = new Rong_Controller_Route();
$route->add( "product-:num.html","Index/router/$1" );
$route->add("user/:num/:word/:any.html" , "Index/user_router/$1/$2/$3" );
$route->add( 'article/([0-9]{3,4})/([a-zA-Z]{1,3})\.html\?id=:num' , 'Index/article_router/$1/$2/$3' );
$route->start();
require_once 'Rong/Controller/Guide.php';
$guide = new Rong_Controller_Guide();
$guide->setControllersDir( ROOT . "/application/controllers");
$guide->start();
?>
实现$route->add( "article/([0-9]{3,4})/([0-9]{1,2}).html" , "index/uri/$1/$2" );
然后访问:/index.php/article/323/32.html