theres a great article at webmonkey all about search engines by someone who seems to know quite a lot.
Some engines don't look at URL's with "?" in them...others do.
As for having a header() script in you rpage...it won't do your listing any good thats for sure since engines look for content on each page as well as meta tags, titles, etc.
Perhaps a way around this is to do this:
<?php
if($var == "blah blah) {
header("blah");
}
?>
<meta...
<title>...
key words pertaining to site etc...
This way if an engine looks at your page it will still see all the content but if a user comes along with a bad var they'll be redirected away.
scottd