I am implementing the "Yii blog demo" in my website, but I found that the URLs of the posts appear like this: "this+is+a+post". However, I would like "this-is-a-post".
open models/Post.php and look for the getUrl method and change it
<?php
# ...
public function getUrl()
{
return Yii::app()->createUrl('post/view', array(
'id'=>$this->id,
# change this
'title'=>$this->title,
# like so
'title'=>preg_replace('|\s+|', '-', $this->title),
));
}
# ...