I found this script on Ray Camden's blog for doing SES but it wont work if 
placed in Application.cfc.

How should I use this script when using Application.cfc?

I really don't want to put it on the top of each page.  I would prefer to use 
it in the Application.cfc file.


<cfscript>
function parseSES() {
   var pathInfo = reReplaceNoCase(trim(cgi.path_info), '.+\.cfm/? *', '');
   var i = 1;
   var lastKey = "";
   var value = "";
   
   if(not len(pathInfo)) return;

   for(i=1; i lte listLen(pathInfo, "/"); i=i+1) {
          value = listGetAt(pathInfo, i, "/");
          if(i mod 2 is 0) url[lastKey] = value; 
          else lastKey = value;
   }
   //did we end with a "dangler?"
   if((i-1) mod 2 is 1) url[lastKey] = ""; 
   return;
   
}
</cfscript>


<cfoutput>
#parseSES()#
</cfoutput>     


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312014
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to