301 redirect vs Yii redirect

What are the differences (if any) between doing a 301 redirect (modifying the htaccess file) and the Yii redirect?

never mind, I found the answer.


public void redirect(mixed $url, boolean $terminate=true, integer $statusCode=302)

Yii redirect can be set to 301 or 302 just setting de last parameter of the function