Listing 1

<!---
<CF_FakeURL>

Creates URL parameters from values passed as part of the path (as opposed to in the query_string). This technique helps ensure that search engines and spiders index pages that might have been ignored (as some ignore any dynamic URLs).

Using this tag, a URL like this:

foo.cfm/FName/Ben/LName/Forta

will be processed and two URL variables will be created: URL.FName=Ben and URL.LName=Forta.

To use, simply place <CF_FakeURL> anywhere in your page (before the first URL variable is needed). By default / is used as the delimiter; an alternate delimiter may be specified in the DELIMITER attribute.

Ben Forta - ben@forta.com
12/1/2001
--->

<!--- Delimiter, defaults to / --->
<CFPARAM NAME="ATTRIBUTES.delimiter" DEFAULT="/">

<!--- Extract "query_string" from full path --->
<CFSET query_string_length=Len(CGI.PATH_INFO)-Len(CGI.SCRIPT_NAME)>
<CFSET query_string=Right(CGI.PATH_INFO, query_string_length)>

<!--- How many items in "query_string? --->
<CFSET items=ListLen(query_string, ATTRIBUTES.delimiter)>

<!--- Must be an even number, if odd, bail --->
<CFIF items MOD 2 IS 0>

<!--- Loop through list, pair of items at a time --->
<CFLOOP FROM="1" TO="#items#" STEP="2" INDEX="i">

<!--- Get each pair, first is name, second is value --->
<CFSET i1=ListGetAt(query_string, i, ATTRIBUTES.delimiter)>
<CFSET i2=ListGetAt(query_string, i+1, ATTRIBUTES.delimiter)>

<!--- Save this URL parameter --->
<CFPARAM NAME="URL.#i1#" DEFAULT="#i2#">

</CFLOOP>

</CFIF>