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">
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.


Your email address will not be published.