[thelist] JavaScript variable into CF variable

martin.p.burns at uk.pwcglobal.com martin.p.burns at uk.pwcglobal.com
Wed Nov 21 12:10:28 CST 2001


Memo from Martin P Burns of PricewaterhouseCoopers

-------------------- Start of message text --------------------

Hi there

With Apache, the error page (and this is true for all
error documents, not just 404) will report the standard
environmental variables for the *real page* which you're
using for the error handler.

So if your .htaccess contains
ErrorDocument 404 /errors/error-404.html
then your standard environmental variables for the URL
http://yourdomain.com/nosuchpage.html
will be those of
http://yourdomain.com/errors/error-404.html

Fortunately, Apache defines some other environmental variables
which pass information to the error page about the page which
was initially requested:

REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 9000/712)
REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
REDIRECT_QUERY_STRING=
REDIRECT_REMOTE_ADDR=121.345.78.123
REDIRECT_REMOTE_HOST=ooh.ahhh.com
REDIRECT_SERVER_NAME=crash.bang.edu
REDIRECT_SERVER_PORT=80
REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
REDIRECT_URL=/nosuchpage.html

(note the REDIRECT_ prefix)

This is taken from
http://httpd.apache.org/docs/custom-error.html

Now whether CF picks these up, I can't tell you. But Apache provides them.

Cheers
Martin


To:   thelist at lists.evolt.org
Subject:  Re: [thelist] JavaScript variable into CF variable

I do know that IIS and Apache handle the 404 differently.  I think evolt
went through a similar problem.  Dan, did you not have to rewrite a portion
of Apache and recompile to get it to pass the original url to the 404
handler?

----- Original Message -----
From: "Minh Lee Goon" <v7ac at sdsumus.sdstate.edu>
Subject: Re: [thelist] JavaScript variable into CF variable


: #cgi.Query_String# doesn't return a value. Neither does #cgi.Path_Info#.
: I'm using CF5 with Apache on Windows. I wonder if Apache might have
: something to do with it, because the article I read uses IIS.
:
: Joshua Olson wrote:
: >
: > Take a look at cgi.query_string and see if it contains the url in it.
: >
: > -joshua



--------------------- End of message text --------------------

This e-mail is sent by the above named in their
individual, non-business capacity and is not on
behalf of PricewaterhouseCoopers.

PricewaterhouseCoopers may monitor outgoing and incoming
e-mails and other telecommunications on its e-mail and
telecommunications systems.
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.





More information about the thelist mailing list