Before outputting page content

Note this must be before any html headers are sent (i.e. in php code before html output)

Redirect to a new page
	header("Location: index.php");
Reload the current page
	header('Location: '.$_SERVER['PHP_SELF']);

The php header function

Redirect with check you’re not already on target page
  if (strpos($_SERVER["REQUEST_URI"], 'home-holding') === False)
    wp_redirect( home_url( '/home-holding') );

If you’ve outputted some page content

Using a META tag is the easiest way

<META HTTP-EQUIV="refresh" content="0;URL=index.php">
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.