'/(%path%(.%lang%(.%format%)))', 'outputUri' => '/(%path%.%lang%.%format%', 'vars' => array( 'path' => array('([a-z\-]+(?:\/[a-z\-]+)*)', 'index'), 'lang' => array('(fr|en)', 'fr'), 'format' => array('(html)', 'html'), ) ); echo '$route = '; print_r($route); echo ''; //exit; $uri = new Uri($route); $myUri = '/index.en.html'; echo '$myUri = '; print_r($myUri); echo ''; if ( !$data = $uri->parse($myUri) ) { die('Format incorrect !'); } echo '$data = '; print_r($data); echo ''; $newUri = $uri->build($data); echo '$newUri = '; print_r($newUri); echo ''; ?>