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
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
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
-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
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
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.
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
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?
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
9 matches
Mail list logo