PostNuke Help

Previous
pnModURL

Home
up

Next
pnSecAddSchema


pnRedirect

redirect to another page

Synopsis

void pnRedirect(url);

Description

pnRedirect() creates an absolute URL to a PostNuke webpage and sets the relevant HTTP header accordingly.

Parameters

url

A url to redirect to. The URL can have GET parameters appended to it in the normal fashion.

Notes

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.

Examples

// 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');
       

See Also

pnModURL()


Previous
pnModURL

Home
up

Next
pnSecAddSchema