It doesn't have to be placed on top but rather there cannot be output before it.
echo 'foo';
header('Location: foo.php');
That won't work. But :
$var = 'blah';
if ($foo == 'wusup') {
header('Location: wusup.php');
}
Now that works, just don't have output beforehand. If you MUST output something before and have an aversion towards using html meta refresh then you could use output buffering :
http://www.zend.com/zend/art/buffering.php
But yeah, it's not like in ASP.