There is another way on Windows 2000 and NT using IIS
web server error handler. It could work. Here is an
article about it:

http://www.sys-con.com/coldfusion/archives2/0201/morgan/index.html


SG

--- Andrew <[EMAIL PROTECTED]> wrote:
> 
> Why not do this ?
> page.cfm/abcd/
> This works fine and you can simply strip out all the
> variables after
> page.cfm using list functions with a '/' as your
> delimiter.  Each unique
> link does get spidered by search engines and it
> seems to me that it does
> exactly the same thing you were doing without the
> hassle of having a 404
> error thrown and then including code.  Or maybe I'm
> missing something
> critical in what you want to do?
> 
> 
> Andrew Hewitt
> Web Application Developer
> webworld studios, inc.
> www.wwstudios.com
> "Okay, who stopped the payment on my reality check?"
> 
> 
> -----Original Message-----
> From: Darren Tracey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 7:06 AM
> To: Spectra-Talk
> Subject: Problem hiding Url parameters
> 
> 
> I'm having problems using a trick that's been
> working for me with CF for a
> long time now, but just doesn't seem to work with
> spectra.
> 
> I have a spectra site made up entirely of virtual
> pages being rendered from
> one cfm page.
> In order to hide the 'messy' url parameters required
> to specify the page you
> want, and to make search engines spider the site,
> I've always set the
> 'Missing Template Handler' setting in 'Settings' in
> the CF admin page to be
> a file called 404.cfm, then had it examine the
> requested script name and set
> the correct URL parameters then cfinclude the proper
> file.
> 
> eg.
> If I wanted to go to:
>  page.cfm?id=abcd
> I would go to:
>  page_abcd.cfm
> This would cause the 'Missing Template Handler' file
> to be run, which has
> this code:
> <cfif left(cgi.SCRIPT_NAME,6) is "/page_" and
> right(cgi.SCRIPT_NAME,4) is
> ".cfm">
>       <cfset url.id = mid(cgi.SCRIPT_NAME,  7, 
> len(cgi.SCRIPT_NAME)-10)>
>       <cfinclude template="/page.cfm">
> <cfelse>
> 
> This makes the browser think you're still looking at
> the page you requested
> (which using cflocation won't do), and hides all the
> working bits.
> The file must still end with .cfm or CF won't parse
> it, and you can't just
> change the setting in the Netscape webserver admin
> to use its 404 error
> page, because it won't pass it to CF for parsing.
> 
> This has always worked for me with any CF page, but
> when I use it on a
> spectra page it gives this error:
> ---------------------------
> Error Occurred While Processing Request
> Error Diagnostic Information
> An error has occurred.
> 
> 
> HTTP/1.0 404 Object Not Found
> ---------------------------
> It is throwing this error as it hits the cfa_page
> statement in the page.cfm
> file. There is nothing else above this statement,
> and the same page works
> perfectly if you directly call it, or even just
> change the cfinclude to a
> cflocation (and add the url parameter to the page
> name) however it changes
> the URL to the new one, so is of no use.
> 
> Anyone got any ideas?
> Do I have to abandon this approach and return to
> using messy Url parameters
> and never get my site spidered by a search engine?
> 
> Regards
> 
> Darren Tracey
> Web Developer
> Thiess
> Australia
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to