PHP 404 document's REQUEST_URI does not hold expected value in $_ENV and $_SERVER

This is a discussion on PHP 404 document's REQUEST_URI does not hold expected value in $_ENV and $_SERVER within the PHP Language forums, part of the PHP Programming Forums category; Hello, I wanted to migrate some custom 404 error pages from shtml to php for the ease of email notification ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-02-2004
jerrygarciuh
 
Posts: n/a
Default PHP 404 document's REQUEST_URI does not hold expected value in $_ENV and $_SERVER

Hello,

I wanted to migrate some custom 404 error pages from
shtml to php for the ease of email notification of lost pages.
However when PHP processes the page $_ENV['REQUEST_URI']
and $_SERVER['REQUEST_URI'] both now hold the error page eg "404.php".

Does anyone have advice on how to dodge this? Should I just continue to use
shtml error pages and
do an shtml include on a little php script to do the mail?

Any advice?

TIA

jg


Reply With Quote
  #2 (permalink)  
Old 11-02-2004
Daniel Tryba
 
Posts: n/a
Default Re: PHP 404 document's REQUEST_URI does not hold expected value in $_ENV and $_SERVER

jerrygarciuh <designs@no.spam.nolaflash.com> wrote:
> I wanted to migrate some custom 404 error pages from
> shtml to php for the ease of email notification of lost pages.
> However when PHP processes the page $_ENV['REQUEST_URI']
> and $_SERVER['REQUEST_URI'] both now hold the error page eg "404.php".
>
> Does anyone have advice on how to dodge this?


All I can tell you is that in my setup above works as you desire.

Tell us a little more about your setup.

The only thing I do in Apache is a .htaccess with:
ErrorDocument 404 /404.php

--

Daniel Tryba

Reply With Quote
  #3 (permalink)  
Old 11-03-2004
jerrygarciuh
 
Posts: n/a
Default Re: PHP 404 document's REQUEST_URI does not hold expected value in $_ENV and $_SERVER

Daniel,

Thanks for the response. Unsure what the issue was but twmtowtdi.

Solved like so:

// in 404.shtml

<!--#include virtual="./missing.php?uri=${REQUEST_URI}" -->

// mail done by php

Thanks!

jg


"Daniel Tryba" <news_comp.lang.php@canopus.nl> wrote in message
news:cm70vt$d7o$1@news.tue.nl...
> jerrygarciuh <designs@no.spam.nolaflash.com> wrote:
>> I wanted to migrate some custom 404 error pages from
>> shtml to php for the ease of email notification of lost pages.
>> However when PHP processes the page $_ENV['REQUEST_URI']
>> and $_SERVER['REQUEST_URI'] both now hold the error page eg "404.php".
>>
>> Does anyone have advice on how to dodge this?

>
> All I can tell you is that in my setup above works as you desire.
>
> Tell us a little more about your setup.
>
> The only thing I do in Apache is a .htaccess with:
> ErrorDocument 404 /404.php
>
> --
>
> Daniel Tryba
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0