I have following code:
[b]config/main.php
[/b]
...
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
'showScriptName'=>false,
'urlSuffix'=>'.html',
),
...
controller/blogNewController.php
public function actionIndex() {
$criteria=new CDbCriteria(array('order'=>'time DESC'));
$count=BlogNews::model()->count($criteria);
$pages=new CPagination($count);
$pages->pageSize=5;
$pages->applyLimit($criteria);
$models=BlogNews::model()->findAll($criteria);
$this->render('index', array(
'models' => $models,
'pages' => $pages,
));
}
view/blogNews/index.php
...
$this->widget('CLinkPager', array(
'pages' => $pages,
));
...
When click on 1st page url is
../blogNews/index.html?%2FblogNews%2Findex_html=
should be: ../blogNews/index.html
And on 2nd page url is
../blogNews/index.html?%2FblogNews%2Findex_html=&page=2
should be: ../blogNews/index.html?page=2
What can be the problem and why is adding ‘%2FblogNews%2Findex_html=’ ?