how to redirect

In my Web application’s root directory contains a html page,

For example,my static page is "author.html".

My request url of action is "site/author".

now,how do I redirect to the static page in the action?

What I mean is that the browser’s address is “http://localhost/webapp/author.html” after redirecting,

not "http://localhost/webapp/site/author".

thanks and sorry for my english!

$this->redirect("/webapp/author.html");

Use:


$this->redirect(array('site/author'));

or if you have some variables in URL route:


$this->redirect(array('site/author','id'=>$model->id, 'title'=>$model->title));

… depends on your custom URLs. :)

Thanks buddy :) it worked for me !