I have picked up the method of using the CGI variable PATH_INFO (SCRPT_NAME
depending).  Now I have herd that this method does not work with IIS 5,
however I am running Win2k servers without this problem, sooooo....  Anyway,
I have added a parser in my FormURL2Attributes, that also parses out
variables using this method too.  Posted below.  So my urls look something
like this:

what the user sees-
http://mysite.com/index.cfm/var1.foo1/var2.foo2/var3.foo3.html
what cf sees -
http://mysite.com/index#request.webextension#/var1.foo1/var2.foo2/var3.foo3#
request.spiderext#

I also set two vars in my app_server file called request.webextension and
request.spiderext
request.webextension is set to .cfm and request.spiderext is set to .html,
so if you ever decided to change/mask your cfm extension or use a different
extension for the spider all of your links are updated.  I am not sure how
great this method is, but it seems to work find for me.

FormURL2Attributes:
<cfsetting enablecfoutputonly="yes">
<cfif IsDefined("CGI.QUERY_STRING")>
  <cfloop list="#CGI.QUERY_STRING#" delimiters="&" index="valuepair">
    <cfset urlname = "#ListGetAt(valuepair, 1, "=")#">
 <cfif not IsDefined('attributes.' & urlname)>
   <cfset
setvariable("CALLER.ATTRIBUTES.#urlname#","#evaluate("url."&"#urlname#")#")>
 </cfif>
  </cfloop>
</cfif>
<cfif IsDefined("CGI.PATH_INFO")>
 <cfset list_len = listlen(CGI.PATH_INFO,"/")>
 <cfset list_index =
listcontainsnocase(CGI.PATH_INFO,"index#request.webextension#","/")>
 <cfset list_start = list_index + 1>
 <cfloop index="i" from="#list_start#" to="#list_len#">
  <cfset valuepair = listgetat(CGI.PATH_INFO, i, "/")>
  <cfset varname = gettoken(valuepair, 1, ".")>
 <cfif not IsDefined('attributes.' & varname)>
  <cfset setvariable("CALLER.ATTRIBUTES.#varname#", "#gettoken(valuepair, 2,
".")#")>
 </cfif>
 </cfloop>
</cfif>
<cfif IsDefined("FORM.fieldnames")>
  <cfloop list="#FORM.fieldnames#" index="field">
    <cfif not IsDefined('attributes.' & field)>
   <cfset
setvariable("CALLER.ATTRIBUTES.#field#","#evaluate("form."&"#field#")#")>
 </cfif>
  </cfloop>
</cfif>
<cfsetting enablecfoutputonly="no">
----- Original Message -----
From: "Nathan Shaw" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Tuesday, January 23, 2001 11:21 AM
Subject: RE: Search Engine Safe URLs


> I just found this link on the WebDesign-l list from a
> while back. It discusses CF and search engine safe
> URLs. I know that many of you have worked with them
> and Fusebox and I believe the general consensus was
> that they are not worth the hassle.
>
> SOOoooOoOOoo, I am wondering what you all think of the
> procedures/ideas discussed here. How would they work
> and are they different than that which Steve and the
> rest of you have tried? I am defintitely interested in
> getting all of the sites I work on indexed as much as
> possible...
>
>
http://forums.allaire.com/devconf/Index.cfm?CFID=130074&CFTOKEN=79816184&&Me
ssage_ID=18401#Message18401
>
> Nate
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to