[thelist] RE: CFML Search Interface

Bruce Heerssen bheerssen at visualbridge.tv
Tue Jan 23 15:04:38 CST 2001


--__--__-- original message --__--__--

Message: 13
From: "Matt Mozer" <matthewmozer at hotmail.com>
To: thelist at lists.evolt.org
Date: Tue, 23 Jan 2001 12:09:31 -0600
Subject: [thelist] CFML Search Interface
Reply-To: thelist at lists.evolt.org

I have recently created a search interface in Cold Fusion for one of my
websites.  I had someone at our host server (we do not host our site) create
an Index Server Application that I am pointing to in my search.cfm file.
The question I have is I have a members only folder in my root directory
that I would like to disallow my search interface from displaying files
within this folder.  I am wondering if there is a way to do this.  I
appreciate any ideas on this matter.

<snip>
--__--__-- end --__--__--

There are two ways to accomplish this. The best way is probably to ask your host
to exclude whichever directory you do not want indexed. I don't know Index
Server too well, but it should be possible. If your hosting provider can't or
won't do that for you, you can filter the results base upon the url returned.

Example:

<CFOUTPUT query="results">
<cfif url does not contain "(name of members directory)">
<TR>

<TD>#SCORE#</td>
<TD><A href="#URL#">#TITLE#</a></td>
</tr>
</cfif>
</cfoutput>

The advantage to this approach is that you can provide search capabilities to
protected directories by checking permission for the user. ie: <cfif url does
not contain "(something)" or isAuthenticated()>, or something like that.

Hope that helps, and makes sense :)

-- Bruce





More information about the thelist mailing list