ColdFusion can't do this natively... you have to build your own code to do it.
Basically, you want the URL to look something like:
Code:
[URL unfurl="true"]www.mydomain.com/index.cfm/id=0332/data=2234[/URL]
But ColdFusion won't plug your variable values into the URL scope, of course, so you need to use one or more of the CGI scope variables. Unfortunately, the
web server won't even consider this a query string so you can't just look at
. And to make matters worse, servers aren't particularly consistent in how they fill in the CGI variables... so you kind of have to hunt-and-peck for the proper ones to use for your particular server and setup.
A common set is:
Code:
<CFSET nVarLen=Len(CGI.PATH_INFO)-Len(CGI.SCRIPT_NAME)>
<CFSET sQueryString=Right(CGI.PATH_INFO, nVarLen)>
and that's a pretty good place to start.
But, for example, CGI.PATH_INFO only returns the "/id=0332/data=2234" portion of the URL on my server... instead of the entire URI it's supposed to contain.
Anyway... some combination of CGI variables are going to give you just the pseudo "query string" (just do
Code:
<CFDUMP var="#CGI#">
to help figure out which one(s)).
Once you have that, then you would do something like:
Code:
<CFLOOP list="#sQueryString#" index="whichVarPair" delimiters="/">
<CFSET "#ListFirst(whichVarPair,"=")#" = ListLast(whichVarPair,"=")>
</CFLOOP>
Now
is going to contain "0332", etc.
-Carl