[thelist] php custom error handling

John Corry webshot at neoncowboy.com
Mon May 21 16:00:18 CDT 2001


In an effort to remove unsightly query strings from my site's URLs (and in
the name of experimentation) I am trying to set up custom error handling by
placing a redirect script on the 404 page...

The admin for the server gave me these instructions:
"Simply name your custom error page badurl.php and FTP it to your www
directory, make sure the the file is owned by your username and that the
permissions are set correctly."

So, I have this script at the very top of the file 'badurl.php':
<?php
$URL=$REQUEST_URI;
$qs=substr("$URL", 31);
header ("Location: http://www.sugarbeachresort.net?page=$qs");
exit;
?>

but, it isn't happening. try it...
http://www.sugarbeachresort.net/grounds should hit the script on badurl.php,
then redirect to http://www.sugarbeachresort.net?page=grounds , it
doesn't...just gives me a real generic 404 page.

Any thoughts on why this doesn't work?

The permissions for that file are read/execute for owner, group and
other...if that matters.

thanks,
John Corry





More information about the thelist mailing list