I had this problem when I was working on a site that needed to have diffrent menues on the side if you loged in as admin, a company or an empoyee... So here is what I did...
I redirected to a "loader scipt", i don't know if that is apropriate name for it but anyway... The loader script took two GET variables... target and url... and with javascript redirected with target.... (vincent: it wont work with Header("Location: url")😉
Loader script:
<?php
print "
<head>
<SCRIPT LANGUAGE=\"Javascript\">";
print "<!-- Begin
parent.$target.location='./$url';
// End -->
";
print "</script>";
print "</head>";
?>
END SCRIPT