need advice on building clean urls

hi I followed a tutorial to hide index.php

http://www.yiiframework.com/wiki/214/url-management-with-htacess/

and get links like this:




http://localhost/keramicon/admin/product/view/id/16



instead of




localhost/keramicon/index.php/?r=admin/product/view&id=6



I noticed that when I switched to that way I have problem with this:




$this->redirect(array('product/view&id='.$id));


which gave me:

localhost/keramicon/admin/product/view&id=6



since I built that code before I switched to new way of building links now I have to redo all the places where I have it.

my question is, is there a way to build redirect links so that when I switch to cleaner urls I dont have to go back and redo redirects?

you can use Yii::app()->createUrl or $this (CController) function to generate urls -


$this->redirect($this->createUrl('product/view', array('id'=>$id));

Or even more easy:


$this->redirect(array('product/view', 'id'=>$id));