I don't think you can. CF is case-insensitive for one thing.
It looks like case MIGHT be preserved in CGI.QUERY_STRING. So you could
try the following:
<cfloop list="#CGI.QUERY_STRING#" delimiter="&" index="keyvalue">
<cfoutput>#listFirst(keyvalue,"=")# =
#listLast(keyvalue,"=")#</cfoutput>
</cfloop>
A couple of problems with that, of course:
- Any URL variables you've explicitly set (such as with cfparam) or
removed won't be accounted for.
- You need to care for instances when there is a key but no value.
"key1=&key2=a"
Why do you need to see your URL variables in their original case?
-----Original Message-----
From: Tuan Tran [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 11:35 AM
To: CF-Talk
Subject: URL Structure
Hi Everybody,
I'm trying to get the name/value pair from url variables. Lets say I
have a url like this:
http://someurlhere.com?Src=blahblah&storyID=1234
Now if I do the following I'll get the name/value pair of the URL vars:
<cfloop collection=#url# item="urlVar">
<cfoutput>#urlVar# = #url[urlVar]#</cfoutput><br /> </cfloop>
My problem is the name element doesn't keep the same case as the actualy
url variable name. Src and storyID gets displayed as SRC and STORYID in
the output. How can I keep the case the same when I loop thru the URL
structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239616
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54