[thelist] PHP environment variables

Simon Ould simon.ould at nortechcontrol.com
Tue Aug 14 06:09:28 CDT 2001


Look at http://www.asp101.com/wrox/17970703.asp :it gives a step-by-step
guide through setting up a custom error page. Admittedly it uses ASP, but
the server variables will still be the same.

<copied from http://www.asp101.com/wrox/17970703.asp >
However, one point to note is that the way IIS loads the page depends on
what type of file caused the error in the first place. 
... Notice that the URL for the missing ASP page is the name of our custom
error page with a query string containing the error number and the full URL
of the page that was requested. In the case of the HTML page that doesn't
exist, the URL is just that of the missing file. You'll see why this is
important when we look at the code in the page.
</copying>

Incidentally, in Apache the variable is REDIRECT_URL (See
http://httpd.apache.org/docs/custom-error.html for more info)

Regards,

Simon.

-------------
Message: 9
Reply-To: <robin at rhastings.net>
From: "Robin Hastings" <robin at rhastings.net>
To: <thelist at lists.evolt.org>
Date: Mon, 13 Aug 2001 15:31:31 -0500
Subject: [thelist] PHP environment variables
Reply-To: thelist at lists.evolt.org

Hello fellow evolters!

I'm trying to set up a 404 page that will email me whenever someone hits it.
All
is well, except that I can't figure out how to get the current URL (the bad
page) to show up in PHP using IIS 4. I gather that in Apache there is an
environment variable "REQUEST_URI" that does just what I want, but IIS
refuses
to acknowledge it. I'm not finding anything helpful at the MS knowledge base
or
in my phpinfo() page. Is there something out there that will do this, or am
I
just outta luck? Thanks!!

Robin Hastings
Webmistress - InterTec Designs
robin at intertecdesigns.com
http://www.intertecdesigns.com





More information about the thelist mailing list