Re: Still executing afte die()?
| From: | Leif K-Brooks | Date: | Sat, 04 Jan 2003 05:39:56 +0000 |
| Subject: | Re: Still executing afte die()? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130206@lists.php.net to get a copy of this message | ||
Because URLs are case-sensitive. A user may have cap lock on and go to something like MYPAGE.PHP, but the 404 page is supposed to redirect them to mypage.php.
Mike Mannakee wrote:
My question would be what's the point? Why have it redirect to itself at all? You could more easily just convert it to lowercase and insert that value. I can't figure what possible advantage there is to doing the redirect to a custom error page. Only difference is what the user would see in the URL, no? Mike "Leif K-Brooks" <eurleif@buyer-brokerage.com> wrote in message news:3E164E53.1030209@buyer-brokerage.com...-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.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. Rick Emery wrote:header() statement.You'll never get to the die() statement, because you redirected with theunauthorized attempt to decrypt it----- Original Message ----- From: "Leif K-Brooks" <eurleif@buyer-brokerage.com> To: <php-general@lists.php.net> 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['REQUEST_URI']){ header("Location: http://{$_SERVER['HTTP_HOST']}".strtolower($_SERVER['REQUEST_URI'])); die; } which redirects to the same page with a lowercase URL if there are any uppercase characters. After that, it inserts the 404 into the database for checking later. But, when I test it with something like PaGeTHATSHOULDBELOWERCASE.php, it redirects to pagethatshouldbelowercase.php but still inserts it into the database (with the uppercase page name) even though the redirected page is 404-free. What am I doing wrong? -- The above message is encrypted with double rot13 encoding. Anyunauthorized attempt to decrypt it will be prosecuted to the full extent of the law.will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- The above message is encrypted with double rot13 encoding. Any