Failsafe Page Redirects with PHP
August 19th, 2006
If you ever need a failsafe way to redirect browsers with PHP, whether or not the page headers have already been sent, look no further than Jakob B.’s snippet on PHP.net.
This code snippet uses the cleanest method, the php header function, if it is available. Otherwise, it defaults to javascript. Failing that approach it uses the old meta refresh method.
Entry Filed under: PHP/MySQL Snippets, Signposts






