Nathan Mische wrote:
I just ran into this exact same issue. Some of my friendly urls were using
/home/ instead of the /go/ url pattern as specified in FUSettings Config.
I was able to correct the problem using Gavin's solution, but does anyone
have any ideas as to what may have caused this? I'm worried it may happen
again and I will have no idea until a user reports it.

Here's some code you can run that will do the same thing (delete FU mappings from memory) except you do not need to restart CF.


==================
This will delete ALL FU mappings on the server:

<cfset dataClass = createObject("java", "FriendlyURLData") />
<cfset dataObject = dataClass.getInstance() />
<cfset mappings = dataObject.getMappings() />
<cfloop collection="#mappings#" item="alias">
    <cfset dataObject.removeMapping(alias) />
    <cfset dataObject.removeMapping(i) />
</cfloop>
===================

===================
Oo you can use a conditional statement to delete FU mappings for a specific site (or folder, etc). You must customize this code first:


<cfset dataClass = createObject("java", "FriendlyURLData") />
<cfset dataObject = dataClass.getInstance() />
<cfset mappings = dataObject.getMappings() />

<cfdump var="#dataObject#" />
<cfdump var="#mappings#" />
<cfabort>

<cfloop collection="#mappings#" item="alias">
  <cfset bDelete = false />
  <cfif PLACE CONDITIONAL STATEMENT HERE WITH INFO FOUND FROM CFDUMPs>
     <cfset bDelete = true />
  </cfif>
        <!--- Test alias for conditional statement --->
        <!--- <cfoutput>#alias#</cfoutput><br /> --->
    <cfset dataObject.removeMapping(alias)>
  <cfif bDelete>
    <cfset dataObject.removeMapping(i) />
  </cfif>
</cfloop>
===================

Thank Spike for the code. I've modified it here a little, but he's the one who wrote the methods and component =)

-Jeff C.

---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to