And actually.. If you follow my previous advice.. Your CFMX server will
be brought to it's knees, if the 404.cfm file for the client's site
doesn't exist.
Instead, use this:
=======
<cfset position = listlen('#cgi.path_translated#', '\')>
<cfset urltrans = "#listdeleteat('#cgi.path_translated#', '#position#',
'\')#">
<cfif FileExists("#urltrans#\404.cfm")>
<cfhttp url="http://#cgi.SERVER_NAME#/404.cfm"/>
<cfoutput>#cfhttp.FileContent#</cfoutput>
<cfelse>
<Whatever you want here .. Could be html code or whatever>
</cfif>
=======
Works fine and will check to make sure the file exists first.
| -----Original Message-----
| From: Brook Davies [mailto:[EMAIL PROTECTED]]
| Sent: Saturday, November 16, 2002 12:07 AM
| To: CF-Talk
| Subject: RE: Missing Template Handler...
|
|
| Ohh, its the "default" IIS website! No wonder. I tried putting a file
| relative to the wwwroot, the cfmx/wwwroot/ and everywhere
| else under the
| sun. I had to settle for a mapping. Nice idea for 404's Lee!
|
| At 12:02 AM 16/11/02 -0800, you wrote:
| >Actually, I just found it. Sheesh...
| >
| >In CFMX, there's a basic mapping to "/" which points to the
| root of the
| >IIS default web site. If you put a 404.cfm file in there,
| and then set
| >this to "/404.cfm".. It works.
| >
| >And.. I solved the problem of dynamic 404 redirects using
| this setting.
| >I just created, within the "/404.cfm" file:
| >
| ><cfhttp url="http://#cgi.SERVER_NAME#/404.cfm"/>
| ><cfoutput>#cfhttp.FileContent#</cfoutput>
| >
| >That way.. If they have a 404.cfm file, it'll display it.
| If not.. It
| >does the standard 404 error.
| >
| >Of course, this only works for .CFM files. The .HTM (and
| other) files
| >are handled by the "Custom Errors" setting in IIS.
| >
| >
| >
| >
| >
| >| -----Original Message-----
| >| From: Brook Davies [mailto:[EMAIL PROTECTED]]
| >| Sent: Friday, November 15, 2002 11:53 PM
| >| To: CF-Talk
| >| Subject: Re: Missing Template Handler...
| >|
| >|
| >| Lee,
| >|
| >| This is really messed up. I had the same problem. Solved it by:
| >|
| >| 1. Adding a mapping in the cfadmin for a /errortemplates/ path and
| >| then used that path when asked.
| >|
| >| 2. I still got the error that the template did not exist -
| this is a
| >| bug, try it - it should work
| >|
| >| Brook
| >|
| >| At 11:47 PM 15/11/02 -0800, you wrote:
| >| >Ok.. Now I KNOW I hate help files for certain!! Sheesh
| >| >
| >| >The help for "Missing Template Handler" says:
| >| >
| >| >"This fields lets you specify a default template to
| execute any time
| >| >the ColdFusion Application Server cannot find a requested
| template."
| >| >
| >| >REALLY?? NAW! Say it isn't SO! 8/
| >| >
| >| >I KNEW that. I'm looking for an example. Something that
| >| may give me a
| >| >clue as to what this may be set to. It certainly cannot be to a
| >| >specific (and complete) file/dir path, cause that ain't
| >| working. When
| >| >I enter that, it errors saying:
| >| >
| >| >"The file specified as the site wide missing template
| >| handler does not
| >| >exist. The default missing template handler will be used until a
| >| >replacement is created."
| >| >
| >| >Ok.. well, then what do you set it to? Relative to WHAT?
| >| >
| >| >The docs don't say, and there's nothing I can find in the
| >| support site.
| >| >
| >| >Anyone have a clue here?
| >| >
| >| >
| >|
| >
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm