3

I'm in the process of moving a site to ColdFusion 2016 on Linux/Apache, but one issue we have is the CGI.REDIRECT_URL value is empty. I checked and the following was in the /etc/apache2/mod_jk.conf file:

JkEnvVar REDIRECT_URL

It exists, but it's empty.

I couldn't find much on the web to help except this article, but its already setup like that. Vivio thought 2016 had the redirect_url in the request scope, but that's empty as well.

SOS
  • 6,430
  • 2
  • 11
  • 29
luke
  • 415
  • 1
  • 4
  • 14
  • 1
    Are you dumping `cgi` or are you referencing `cgi.REDIRECT_URL` directly? Dumping the `cgi` scope will only list a defined set of keys. https://www.bennadel.com/blog/2545-dumping-out-the-cgi-scope-does-not-list-all-available-cgi-values-in-coldfusion.htm – user9263373 Feb 14 '18 at 23:34
  • @user9263373 using it directly – luke Feb 14 '18 at 23:38
  • 1
    Hmm, are you sure when you say _"it exists, but its empty"_? Just because you `'#cgi.REDIRECT_URL#'` doesn't necessarily mean it exists. The weird thing about the cgi scope is you can `'#cgi.THIS_IS_A_FAKE_KEY#'` and it won't throw an error and will display as empty. The way to verify is by`structKeyExists( CGI, 'REDIRECT_URL' )`. – user9263373 Feb 14 '18 at 23:56
  • @user9263373 wow, i didn't know that! you're right, i just tested and it doesn't exist. but i found a workaround - or maybe this how it just works in cf2016 - instead of using CGI.REDIRECT_URL i used CGI.SCRIPT_NAME – luke Feb 15 '18 at 00:11
  • 1
    Yeah, it's a weird that the cgi scope works that way. Glad you found a workaround! – user9263373 Feb 15 '18 at 00:12
  • @user9263373 yeah thats definitely weird! thanks for your help :) – luke Feb 15 '18 at 00:26
  • You should write up the solution as an answer to your problem. – James A Mohler Feb 15 '18 at 03:02
  • 1
    @JamesAMohler actually, I did write up a nice summary of this as an answer, but decided to delete it since it technically didn't answer the question and figured it'd get dinged with downvotes. Instead I posted my _"answer"_ as a separate question. – user9263373 Feb 15 '18 at 03:29
  • If it explains how you solved this problem, and how you discovered the solution, I would consider it to be a good answer. It could help out the next person. – James A Mohler Feb 15 '18 at 04:29

0 Answers0