redirect question probably simple

You can redirect after a simple action etc but what’s best practice and how to redirect to another module and controller in the best way? I’ve already tried some things and yes it works but that’s when i use redirect(homeurl.’?r=pathtomodule&controller’); and what if i want sleek and clean urls with mod_rewrite woun’t it interfere with it, i mean won’t it stay like this even when rewrite is enforced by the system?


Just found the way ;)


   $this->createUrl('site/category', array('id'=>$id))


Or even shorter: