references:joomla.framework:application:japplication-redirectredirect
Redirects to another URL, optionally enqueueing a message in the system message queue (which will be displayed the next time a page is loaded) using the enqueueMessage method. If the headers have not been sent, the redirect will be accomplished using a ‘301 Moved Permanently’ code in the header pointing to a new location. If the headers have already been sent, this will be accomplished using a JavaScript statement. Redirect to another URL Syntaxvoid redirect ( $url, $msg, $msgType )
ExamplesExample global $mainframe; $mainframe->enqueueMessage( 'The first message!' ); $mainframe->enqueueMessage( 'The second message!', 'alert' ); $mainframe->enqueueMessage( 'The third message!' ); $mainframe->redirect( JURI::base() . 'index.php?option=com_poll&redirected=1' ); might redirect the browser to http://127.0.0.1/administrator/index.php?option=com_poll&redirected=1. |


