Re: [PHP] Still executing afte die()?

2003-01-04 Thread Leif K-Brooks
As I understand it, your situation is this: a) all your pages are named in lowercase b) if someone tries to access a non-existent page on your site (eg using a URI which is not fully lowercase) they'll hit your 404.php Correct. But if the page was all lowercase they wouldn't be hitting

[PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(strtolower($_SERVER['REQUEST_URI']) != $_SERVER['REQUEST_URI']){ header(Location: http://{$_SERVER['HTTP_HOST']}.strtolower($_SERVER['REQUEST_URI'])); die; } which

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Rick Emery
You'll never get to the die() statement, because you redirected with the header() statement. - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
-Brooks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(strtolower($_SERVER['REQUEST_URI']) != $_SERVER

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Mike Mannakee
ever get to the die() statement, because you redirected with the header() statement. - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php whic

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Jason Wong
On Saturday 04 January 2003 11:00, Leif K-Brooks wrote: But it shouldn't get to the database insert because of the redirect either... I only added the die; when it still inserted with the redirect. As you have already found out, the code _does_ continue to execute after the header() redirect.

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
Message - From: Leif K-Brooks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(strtolower($_SERVER['REQ

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
But I only want it to insert if the page was all lowercase when they went to it. I understand it continuing after redirecting, but why after die()ing too? Putting the insert code into an else statment solved the problem, but it's ugly, and the question still remains... why does it do this?

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Jason Wong
On Saturday 04 January 2003 13:44, Leif K-Brooks wrote: As I understand it, your situation is this: a) all your pages are named in lowercase b) if someone tries to access a non-existent page on your site (eg using a URI which is not fully lowercase) they'll hit your 404.php But I only want