24.05.2013

How To Setup in Yii2 the UrlManager

There was any Changes to Yii 1.1+

Example Code

<?php
'urlManager'=>array(
    'class'=>'yii\web\UrlManager',//Set class
    'enablePrettyUrl'=>true,//new showScriptName = false
    'rules'=>array(
        'post//'=>'post/view',
        'posts/'=>'post/index'
    ),
),
?>
 

Leave a Comment