public function redirect($url, $externalUrl=FALSE) {
	
		// stores enqueued messages for next retrievement
		$this->makeQueuedMessagesPersistent();
		
		if (!$url) return;
		
		// external redirect
		if ($externalUrl) {
			
			header('Location: ' . $url);
			
		// redirect to internal path
		} else {
			
			$router = Router::getInstance();
			$page  = $router->getPage();
			
			if ($page > 1) {
				
				// removes a possible leading slash
				if ('/'==$url{0}) {
					$url = substr($url,1);
				}
				
				// if url contains just module, create a fake action placeholder
				if (FALSE == strpos($url, '/')) {
					$url .= '/';
				}
				
				header('Location: ' . BASE_HREF . $url . '/page-' . $page);
				
			} else {
				
				header('Location: ' . BASE_HREF . $url);
				
			}
				
		}
	
		exit();

	}
public function redirect($url, $externalUrl=FALSE) {
	
		// stores enqueued messages for next retrievement
		$this->makeQueuedMessagesPersistent();
		
		if (!$url) return;
		
		// external redirect
		if ($externalUrl) {
			
			header('Location: ' . $url);
			
		// redirect to internal path
		} else {
			
			$router = Router::getInstance();
			$page  = $router->getPage();
			
			if ($page > 1) {
				
				// removes a possible leading slash
				if ('/'==$url{0}) {
					$url = substr($url,1);
				}
				
				// if url contains just module, create a fake action placeholder
				if (FALSE == strpos($url, '/')) {
					$url .= '/';
				}
				
				header('Location: ' . BASE_HREF . $url . '/page-' . $page);
				
			} else {
				
				header('Location: ' . BASE_HREF . $url);
				
			}
				
		}
	
		exit();

	}
public function redirect ( $ url , $ externalUrl = FALSE ) { // stores enqueued messages for next retrievement $ this -> makeQueuedMessagesPersistent ( ) ; if ( ! $ url ) return ; // external redirect if ( $ externalUrl ) { header ( 'Location: ' . $ url ) ; // redirect to internal path } else { $ router = Router :: getInstance ( ) ; $ page = $ router -> getPage ( ) ; if ( $ page > 1 ) { // removes a possible leading slash if ( '/' == $ url { 0 } ) { $ url = substr ( $ url , 1 ) ; } // if url contains just module, create a fake action placeholder if ( FALSE == strpos ( $ url , '/' ) ) { $ url .= '/' ; } header ( 'Location: ' . BASE_HREF . $ url . '/page-' . $ page ) ; } else { header ( 'Location: ' . BASE_HREF . $ url ) ; } } exit ( ) ; }
Redirect HTTP on the URL param. Relative path as default. Queued messages
get a persistent storage in a cookie in order to being retrieved later.

@param	string	Location URL.
@param	bool	If TRUE, will avoids to add base url (default FALSE).
Redirect HTTP on the URL param . Relative path as default . Queued messages get a persistent storage in a cookie in order to being retrieved later .