tracker issue : CF-3177732

select a category, or use search below
(searches all categories and all time range)

Missing CGI.Redirect_URL

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Cameron Jacobs / Cameron Jacobs (Cameron.Jacobs)

Created: 04/27/2012

Components: Web Container (Tomcat)

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Public Beta / 282611

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 5

I'm currently using Apache to forward missing page requests to /404.cfm and using the onMissingTemplate handler to display some database driven data based on the requested url.  On CF9 I was able to use CGI.Redirect_URL and CGI.redirect_query_string to retrieve the originally queried url, but CF10 does not seem to pass these CGI variables through any longer.

Is there any way I can enable this by changing some XML or has this feature been removed or overlooked?

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3177732


External Customer Info:
External Company:  
External Customer Name: Cameron.Jacobs
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 2008 R2 SP1

64 Bit

Apache 2.2



Same Problem in the CF 10 Release. This is a must-have, unless there is a workaround. In addition, it is no longer possible to define custom CGI-Variables in Apache-RewriteRules, e.g.: RewriteRule .* - [E=test:123] This works fine on tomcat.
Comment by External U.
19600 | May 15, 2012 06:08:37 AM GMT
Delete: This works fine on tomcat. Set: This works fine on CF9 with JRun and Apache.
Comment by External U.
19601 | May 15, 2012 06:09:32 AM GMT
An Explanation of the problem is here under point 3:
Vote by External U.
19622 | May 15, 2012 06:31:11 AM GMT
Same Problem in our Application! Need a bugfix / workaround!
Vote by External U.
19623 | May 15, 2012 06:59:37 AM GMT
I have just found the same problem and have backed out my install of CF10. This is critical functionality that needs to be fixed before I will consider installing CF10 in any environment. I suspect that it is an issue with Tomcat.
Comment by External U.
19602 | June 25, 2012 08:08:21 PM GMT
I am not able to install CF10 in any productive environment (including development and support) until this bug is fixed. It is a critical feature in our system of providing 'friendly' URLs.
Vote by External U.
19624 | June 25, 2012 08:10:22 PM GMT
this is a nasty regression
Vote by External U.
19625 | June 25, 2012 08:18:25 PM GMT
Could anyone tell me, whether this error in CF 10 Update 1 is really fixed? In our test environment(s), this bug is still present. Windows 2008 R2 SP1 or Linux 64 Bit Apache 2.2.1
Comment by External U.
19603 | September 19, 2012 01:40:00 AM GMT
Baumgartner, this is indeed fixed. Could you please reconfigure the connector after applying the update and check if this still does not work for you?
Comment by Rupesh K.
19604 | September 20, 2012 06:52:09 AM GMT
Thanks, after removing and adding the apache connector, the problem is fixed now. New Lines in apache/conf/mod_jk.conf: # custom environment variables JkEnvVar REDIRECT_URL JkEnvVar REDIRECT_REMOTE_HOST JkEnvVar REDIRECT_PATH JkEnvVar REDIRECT_QUERY_STRING JkEnvVar REDIRECT_HTTP_ACCEPT JkEnvVar REDIRECT_HTTP_USER_AGENT JkEnvVar REDIRECT_REMOTE_ADDR JkEnvVar REDIRECT_SERVER_NAME JkEnvVar REDIRECT_SERVER_PORT JkEnvVar REDIRECT_SERVER_SOFTWARE
Comment by External U.
19605 | September 28, 2012 06:34:34 AM GMT
@B Baumgartner, how did you remove and then re-add the apache connector? Did you have to uninstall CF 10 and then reinstall? I can't find a good GUI or other to help me with this process on a Mac OSX Mountain Lion.
Comment by External U.
19606 | September 28, 2012 07:30:24 PM GMT
@CFDad, you dont need to uninstall the server. You just need to reconfigure the connector. Please refer to this article
Comment by Rupesh K.
19607 | October 01, 2012 08:46:57 AM GMT
I removed and re-added the apache connector as described, the JkEnvVar lines listed below were added to /conf/mod_jk.conf, and the first one is REDIRECT_URL, but the behavior is unchanged for me, REDIRECT_URL doesn't exist in the cgi scope when it's called by Apache as a 404 handler. I've restarted both Apache and CF. Update 12 is installed, for what that's worth. Is there something else I need to do? Can anyone confirm that this works for them with Update 12? This is critical functionality. The bug was created 4/27/12, and is still open. Grumble.
Comment by External U.
19608 | December 12, 2013 02:52:47 PM GMT
@dmerill depending on what you're doing you may want to see if REDIRECT_URI will work for you in some cases where you'd expect REDIRECT_URL. That was the case for me.
Comment by External U.
19609 | December 12, 2013 04:30:17 PM GMT
@CFDad: Thanks for chiming in, but REDIRECT_URI doesn't exist in cgi either. The text 'REDIRECT' isn't present in a dump of the cgi scope, so none of those custom vars are. I've verified that the include of mod_jk.conf in my main apache config for this instance is working, by removing a critical alias from the main config, verifying that life is broken, adding it to mod_jk.conf, and verifying that things are normal again. I'm using Apache 2.2.15, which I know isn't the latest. Does anyone know if that's relevant, and if so, what the oldest compatible version of Apache would be? (I need to maintain backwards compatibility for some other things.)
Comment by External U.
19610 | December 13, 2013 07:48:47 AM GMT
Mission critical, breaks custom redirect functionality in our app.
Vote by External U.
19626 | December 13, 2013 07:49:47 AM GMT
@dmerrill A dump of the cgi scope does not show all present redirect variables! Just try to output the cgi.REDIRECT_URL variable in your 404 handler: <cfoutput>#cgi.REDIRECT_URL#</cfoutput> I am using Apache 2.2.21.
Comment by External U.
19611 | December 13, 2013 07:56:13 AM GMT
And not to be stupid, but I don't see any way to subscribe to issues here, so I get notified when someone posts a comment or the issue itself changes. @CFDad, how did you know about the comment/question I posted? Can't be coincidence that you just happened to come back here.
Comment by External U.
19612 | December 13, 2013 08:07:19 AM GMT
Interesting, but not my issue. Both CGI.REDIRECT_URL and CGI.REDIRECT_URI come back as empty string.
Comment by External U.
19613 | December 13, 2013 08:18:22 AM GMT
Sounds weird, what is the changedate of the (normally found in /{ColdFusion10-HomeDir}/config/wsconfig/1/) ? On my local machine with update 12 it´s "2013-11-02 14:12" (the size is 263.168 Byte and md5 hash 838da04ea25e8eb584dadf9cc58ab266). Probably the connector is not up-to-date? Have you tried to remove and add the connector again?
Comment by External U.
19614 | December 13, 2013 08:35:07 AM GMT
Just updated Apache to 2.2.25, the latest as of now. Change date and hash of match yours. Removed and re-added the connector yet again, restarted Apache and CF for good measure. Behavior is unchanged, CGI.REDIRECT_URL and CGI.REDIRECT_URI are empty string. Grrr.
Comment by External U.
19615 | December 13, 2013 09:19:20 AM GMT
And how are you getting notified about msgs here?
Comment by External U.
19616 | December 13, 2013 09:24:38 AM GMT
You can configure it in the preferences of this page (top right corner).
Comment by External U.
19617 | December 13, 2013 10:45:20 AM GMT
Thanks for the hint about notifications.
Comment by External U.
19618 | December 13, 2013 11:18:32 AM GMT
I will say this, it's not entirely necessary to rely only on the updates to get cgi.redirect_url working. You can directly modify the mod_jk.conf file. For example, I have this chunk of code near the bottom: # custom environment variables JkEnvVar REDIRECT_URL JkEnvVar REDIRECT_REMOTE_HOST JkEnvVar REDIRECT_PATH JkEnvVar REDIRECT_QUERY_STRING JkEnvVar REDIRECT_HTTP_ACCEPT JkEnvVar REDIRECT_HTTP_USER_AGENT JkEnvVar REDIRECT_REMOTE_ADDR JkEnvVar REDIRECT_SERVER_NAME JkEnvVar REDIRECT_SERVER_PORT JkEnvVar REDIRECT_SERVER_SOFTWARE
Comment by External U.
19619 | December 13, 2013 11:41:40 AM GMT
OK, sorted. I had the 404 handler configured as an absolute URL, which does work in the sense that the handler gets called, but for some reason that may or may not be specific to my slightly odd networking setup, doesn't set that var. Changing it to a server-relative URL caused things to work as expected. Thanks to all for their help. Devil's in the details...
Comment by External U.
19620 | December 13, 2013 12:16:53 PM GMT
Does anyone know if this is actually fixed, and if so, in what release? "Fixed In Build: 282611" isn't super helpful.
Comment by Dave M.
19621 | January 04, 2017 12:44:59 PM GMT