[wdvltalk] Re: PHP: 404 error handling

2004-04-23 Thread Amrit Hallan
Finally, this code did the trick for me: Error, not running as Apache module";} // get name of the requested page $request = rawurldecode($REQUEST_URI); if(get_cfg_var('magic_quotes_gpc')) $request = stripslashes($request); // check that this is not called directly if ($request == $PHP_SELF) { ec

[wdvltalk] Re: PHP: 404 error handling

2004-04-22 Thread Mark Groen
- Original Message - From: "Amrit Hallan" To: <[EMAIL PROTECTED]> Sent: April 22, 2004 5:39 PM Subject: [wdvltalk] Re: PHP: 404 error handling > No error message. I have even tried print($_SERVER['DIRECT_URL']; and it > returned 0. > print $_SERVER[&#

[wdvltalk] Re: PHP: 404 error handling

2004-04-22 Thread Amrit Hallan
No error message. I have even tried print($_SERVER['DIRECT_URL']; and it returned 0. print $_SERVER['REQUEST_URI']; returns /redirect.php whereas I need to know the name of the file that was not found. Thanks. Amrit http://www.bytesworth.com Mark Groen wrote: - Original Message - From

[wdvltalk] Re: PHP: 404 error handling

2004-04-22 Thread Mark Groen
- Original Message - From: "Amrit Hallan" To: <[EMAIL PROTECTED]> Sent: April 22, 2004 4:02 PM Subject: [wdvltalk] PHP: 404 error handling > I'm trying to write a custom 404 error handling script in PHP. The > script, redirect.php, needs to know what wrong URL was entered by the > visito