RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
....
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'suffix'=>'/',
'rules'=>array(
''=>'site/index',
'<action>'=>'site/<action>',
),
],
...
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<action:\w+>'=>'<controller>/<action>',
),
),