SE friendly URL's

I’m trying to create SE friendly URL’s. I have my menu in a shared folder since it is a dynamic menu which can grow over time and use <cfmodule to integrated it in the different pages. This is an example of how a dynamic link looks like:


        <cfoutput query="getTypes">
			<li><a href="properties.cfm?type=#property_type_id#">#property_type_name#</a></li>
		</cfoutput>

I found this on one of the CF forums and added it to my Application.cfm file:


<cfscript> 
   debug = 0;
   valid_extensions = "html,htm,cfm,asp,jsp";
   url_suffix = ".html";
   path_to_parse = replacenocase(cgi.path_info, cgi.script_name, ""); 
   if (listlen(path_to_parse, "/") gte 2) {
      var_name = "";
      for (x = 1; x lte listlen(path_to_parse, "/"); x = x + 1) {
      if (var_name eq "") {
         var_name = trim(listgetat(path_to_parse, x, "/"));
         if (not refind("^[A-Za-z][A-Za-z0-9_]*$", var_name)) {
            var_name = "";
            x = x + 1;
         }
      } 
      else {
           value_to_set = listgetat(path_to_parse, x, "/");
           if (trim(valid_extensions) neq "" and x eq listlen(path_to_parse, "/")) {
               for (ext = 1; ext lte listlen(valid_extensions); ext = ext + 1) {
                     extension = "." & listgetat(valid_extensions, ext);
                     if (right(value_to_set, len(extension)) eq extension) {
                          value_to_set = left(value_to_set, len(value_to_set) - len(extension));
                          url_suffix = extension;
                          break;
                     }
            }
      }
  setvariable(var_name, value_to_set);
  if (isdefined("debug") and debug) {
     writeoutput("<!-- " & var_name & " = " & value_to_set & " -->" & chr(10));
  }
  var_name = "";
  }
 }
}
</cfscript>

This suppose to give me friendly URL’s but it doen’t. Any idea what I’m doing wrong? Or is it because the menu is in a different directory?

thank you all

Sorry to reply to my own post, I was to late to edit. I found this article as well: http://forums.crystaltech.com/index.php?topic=34030.0 I placed the code:


<cfscript>	
	if (cgi.query_string IS NOT "") {	
	gotoURL = "#cgi.script_name#?#cgi.query_string#";	
	}	
	else {		
	if (cgi.script_name EQ cgi.path_info){		
	gotoURL = cgi.script_name;		
	}		
	else {		
	gotoURL = cgi.script_name & cgi.path_info;		
	}	
	}	
	pathInfo = reReplaceNoCase(trim(cgi.path_info), '.+\\.cfm/? *', '');	
	i = 1;	lastKey = "";	
	value = "";		
	if(not len(pathInfo)) break;	
	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;	
	}	
	break;
</cfscript>

in my Application.cfm but still nothing. And I tried both codes in my menu template as well without result though

Any advise would be greatly appreciated