PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
redirect to another page
void pnRedirect(url);
pnRedirect() creates an absolute URL to a PostNuke webpage and sets the relevant HTTP header accordingly.
A url to redirect to. The URL can have GET parameters appended to it in the normal fashion.
pnRedirect() can handle absolute as well as relative URLs if required. This is most often used in conjunction with other URL-generating functions such as pnModURL.
pnRedirect() carries out a HTTP1.1-compliant redirection. This function should not be used when output is also required, as the output will not be displayed.
// Redirect back to the homepage
pnRedirect('index.php');
// Redirect to a news page
pnRedirect(pnModURL('News',
'user',
'view',
array('sid' => 3, 'index' => 0)));
// Redirect off-site
pnRedirect('http://www.remotesite.com');
Previous |
Next |