// in Web config
'urlManager'=>[
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false, // Disable index.php
'suffix'=>'.php',
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
],
'urlManager'=>[
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false, // Disable index.php
'suffix'=>'.php',
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
],
No comments:
Post a Comment