do you mean something like this?
test.html:
<head>
<title>Test Link</title>
</head>
<body>
<a href="test.php">Test Page</a>
</body>
test.php:
<head>
<title>Test Page</title>
</head>
<body>
<h1>Environment Variable:</h1>
<p>-<? print $REMOTE_ADDR; ?>-</p>
<p><a href="<? print $HTTP_REFERER; ?>">back</a></p>
</body>
It should nearly work with header(). Was that what your looking for?
Tanja