i new yii framework, , can't see find information or forums how redirect after 10 seconds has pass on page. example after resetting password, redirect login page once been 10 second allow user see message display on page.
you can call yii::app()->clientscript->registermetatag()
register such meta tag redirect:
yii::app()->clientscript->registermetatag("10;url={$returnuri}", null, 'refresh');
this generate:
<meta http-equiv="refresh" content="10;url=/foo/index.php?r=site/catalog"/>
which produce redirect after waiting 10 seconds.
it's not necessary use yii if you're making simple redirect. can use javascript , this:
window.location.href = 'http://yournewurlgoeshere.tld/foo/bar';
hope helps!
Comments
Post a Comment