?r=post/view&type=page&key=about : this is a "static" page ?r=post/view&type=article&key=first-article : this is an article
What I want is to rewrite post of page type and post of article type in diffirent types of URL. For ex,
/about.html (rewrite for ?r=post/view&type=page&key=about) /article/first-article.html (reqrite for ?r=post/view&type=article&key=first-article)
(I have many other content types, not only page and article).
Is there any way to achieve that? I tried doing the following but it doesn't work at all:
'components'=>array(
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'matchValue'=>true,
'rules'=>array(
'<type:[a-z0-9\-]+>/<key:[a-z0-9\-]+>.html' => 'post/view', // other post view
'<key:[a-z0-9\-]+>.html' => array('post/view', 'defaultParams'=>array('type'=>'page')), // static page view
),
),

Help
















