Page 1 of 1

apache 404 redirect and php

Posted: Tue Aug 06, 2002 2:17 am
by gintonic
My Apache 404 error page contains a php part (redirected with .htaccess)
The only output I wanna have is the url, that caused the error. My code only works with Mac IE 5, I don't understand it, I've always thought php was server side??
I'm using the rather old php version 3.0.16....

that's my error-file code:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php

echo("$HTTP_REFERER");

?>
</body>
</html>


any help :-) ??

Posted: Tue Aug 06, 2002 2:21 am
by twigletmac
php manual wrote:'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
The user agent being the browser so this is really a client side issue. Unfortunately whether it works or not is dependent on which browser a user is using and how they have it configured.

Mac