Hi. I'm trying to write a page that will intelligently figure out what page the 404 error came from, and report an appropriate link.
In .htaccess I have;
ErrorDocument 404
..and in test.php, I have;
Does anyone know how to get the URL for the missing file into a variable?
TIA.
Andy
In .htaccess I have;
ErrorDocument 404
..and in test.php, I have;
Code:
foreach ($_GET as $name => $val) {
echo "$name => $val <BR>";
}
foreach ($_POST as $name => $val) {
echo "$name => $val <BR>";
}
foreach ($GLOBALS as $name => $val) {
echo "$name => $val <BR>";
}
foreach ($HTTP_ENV_VARS as $name => $val) {
echo "$name => $val <BR>";
}
Does anyone know how to get the URL for the missing file into a variable?
TIA.
Andy