CHtml::link uses normalizeUrl(), which uses createUrl(). The special topic page (http://www.yiiframework.com/doc/guide/1.1/en/topics.url) says that createUrl will use the ‘path’ format if it is configured this way, but it doesn’t seem to be doing that.
Is this a bug, or am I doing something wrong. Should I just use hardcoded anchor link tags instead of CHtml::link?
this should be configurable in your config/main.php in the urlManager. Can you please paste your urlManager setup.
If you would just like to eliminate the query string and puts the GET parameters into the path info part of URL you should just define ‘urlFormat’=>‘path’, in your url manager and leave the urlRules empty.
Another approach would be to have the following url rule:
, which will further remove the GET parameters from the url and will bind only their values.
Please note that <by:\w+> allowes the by tag to be populated with almost any character. If you would like to make it more strict you could use (tag|tag2|tag3…etc) if you have a certain set of options.