Forum Moderators: phranque

Message Too Old, No Replies

404 error lose cgi.scriptname

I am losing original page not found

         

davidsatz

10:43 pm on Mar 29, 2006 (gmt 0)

10+ Year Member



Hi (my first post here :-O )

I am running Apache 2.055 with ColdFusion 7.01 on Windows 2003

I in my CONF file
ErrorDocument 404 /404/notfound.cfm

When the page that is not found is a CFM, I get all the expected CGI information in my /404/notfound.cfm page; however, when the page that is not found is not a CFM (i.e.. a folder that does not exist) I get /404/notfound.cfm as the cgi.script_name.

Is there any way to get Apache to retain the original cgi info for the page and query_string, too?

TIA,

Thanks,
David Satz

[edited by: jdMorgan at 10:59 pm (utc) on Mar. 29, 2006]
[edit reason] No sigs, please. See Terms of Service. [/edit]

jdMorgan

11:03 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



David,

Welcome to WebmasterWorld!

I'm no CF expert, but the server does retain the originally-requested URL in one or more environment variables -- The Apache variable %{THE_REQUEST}, for example, gives the full original browser request line, i.e. "GET /contoct.html HTTP/1.1"

I'm not sure about the server variable-naming conventions used in CF, but I'm sure the variable is available.

Jim

davidsatz

3:31 am on Mar 30, 2006 (gmt 0)

10+ Year Member



Thank you jdMorgan - you are correct. ColdFusion does display it when you dump the CGI variable scope, but CGI.REDIRECT_URL and CGI.REDIRECT_QUERY_STRING have just the values I need :-D