Spawn Framework · Contact · Community · Tutorial · Documentation · Download · About

Learn :: Router

Sometimes we have long adres www and need he shorten.
To this operation we can use Spawn Framework router:
Open /Bin/Config/Router.php ,
And create new short adres:
$config['Static'] = array(    
     'shortName' => array(
                'request_uri' => 'Home/test/',
                ),      
);
Now if we open www.mysite.com/shortName , Framework load home controller and test action.
If we need use regex in router, use $config['Dynamic']:
$config['Dynamic'] = array(
    'page-(.*)-(.*)' => array(
                'request_uri' => 'Home/test/$1/$2',
                ),  
);