Re: [PHP] Custom Error 404

2001-01-27 Thread Rasmus Lerdorf

This is a web server question, not a PHP question.  You didn't say which
web server you are using on NT5, nor which one you are planning to use on
Linux.  PHP has nothing to do with how this works.

On Linux with Apache you will get the following variables when you make a
request for domain.com/blah?abc=123def=456

REDIRECT_ERROR_NOTES File does not exist: /home/rasmus/phpweb/blah
REDIRECT_QUERY_STRINGabc=123def=345
REDIRECT_REQUEST_METHOD  GET
REDIRECT_STATUS  404
REDIRECT_URL /blah
QUERY_STRING empty
REQUEST_URI  /blah?abc=123def=345

-Rasmus


On Sat, 27 Jan 2001, [ rswfire ] wrote:

 I am designing a network of Internet sites on NT5 using PHP.  However, when
 I go live with the network, it will be on a Linux system using PHP.

 My sites are handled somewhat uniquely.  When a visitor (or a component of
 the network) enters a URL address, the address does not really exist!  They
 are given a custom 404 error page that determines what information/site they
 are trying to view and the page is then created.

 I need to know if Linux handles custom error messages the same as NT5.

 Here's the scenario:

 Let's say I call the following page:
 http://domain.com/site/index.html?anyvar=yeah

 The page does not exist so the custom error page is called.  For now, I have
 phpinfo() in the custom error page.  On NT5, the following appears under the
 phpinfo():

 SCRIPT_NAME  = name of error page
 QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah

 Is this how the query string will appear on a Linux machine?  I need to know
 in order to parse the string right...

 If it will appear differently, please let me know how.  Thanks in advance!!
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Custom Error 404

2001-01-27 Thread [ rswfire ]

Thank you, Rasmus.

I had a feeling I needed to provide more information.  Right now, I am 
running NT 5, with the CGI version of PHP 4, and IIS 5 as the web server.

As for the Linux machine, it will be running Apache web server.  So I'm 
assuming that the information below is what I need.  It looks like all I 
need is the REDIRECT_QUERY_STRING on Apache.  So I will only need to parse 
the NT string while I am developing the network.  Thanks again!


From: Rasmus Lerdorf [EMAIL PROTECTED]
To: "[ rswfire ]" [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Custom Error 404
Date: Sat, 27 Jan 2001 12:17:01 -0800 (PST)

This is a web server question, not a PHP question.  You didn't say which
web server you are using on NT5, nor which one you are planning to use on
Linux.  PHP has nothing to do with how this works.

On Linux with Apache you will get the following variables when you make a
request for domain.com/blah?abc=123def=456

REDIRECT_ERROR_NOTES File does not exist: /home/rasmus/phpweb/blah
REDIRECT_QUERY_STRINGabc=123def=345
REDIRECT_REQUEST_METHOD  GET
REDIRECT_STATUS  404
REDIRECT_URL /blah
QUERY_STRING empty
REQUEST_URI  /blah?abc=123def=345

-Rasmus


On Sat, 27 Jan 2001, [ rswfire ] wrote:

  I am designing a network of Internet sites on NT5 using PHP.  However, 
when
  I go live with the network, it will be on a Linux system using PHP.
 
  My sites are handled somewhat uniquely.  When a visitor (or a component 
of
  the network) enters a URL address, the address does not really exist!  
They
  are given a custom 404 error page that determines what information/site 
they
  are trying to view and the page is then created.
 
  I need to know if Linux handles custom error messages the same as NT5.
 
  Here's the scenario:
 
  Let's say I call the following page:
  http://domain.com/site/index.html?anyvar=yeah
 
  The page does not exist so the custom error page is called.  For now, I 
have
  phpinfo() in the custom error page.  On NT5, the following appears under 
the
  phpinfo():
 
  SCRIPT_NAME  = name of error page
  QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah
 
  Is this how the query string will appear on a Linux machine?  I need to 
know
  in order to parse the string right...
 
  If it will appear differently, please let me know how.  Thanks in 
advance!!
  _
  Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


_
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Custom Error 404

2001-01-27 Thread Rasmus Lerdorf

 As for the Linux machine, it will be running Apache web server.  So I'm
 assuming that the information below is what I need.  It looks like all I
 need is the REDIRECT_QUERY_STRING on Apache.  So I will only need to parse
 the NT string while I am developing the network.  Thanks again!

The parse_str() function will come in handy here.  See php.net/parse_str

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]