This is what i do for the missing template handler. The handler will kick in 'per instance' not 'per site' as it says. So if you have 2 IIS sites pointing to the same cf instance, when the .cfm requests get passed to coldfusion (assuming you have 'check that file exists' turned off on your web server in IIS) then the missing template handler will run. If you have the check file exists thingo switched on, then you get the IIS 404 handler instead. I have no idea if there is an eqivalent thing for apache.
So what i do is put a template called missingTemplate.cfm in C:\JRun4\bin\server\cfusion\cfusion-ear\cfusion-war\ Then in CF Admin i set the missing template hander to '/ missingTemplate.cfm' In this file i put some code like this: <cfparam name="fromMissingTemplate" default="0"> <cfif fromMissingTemplate eq 0> <cflocation url="/404.cfm"> <cfelse> <h2>Page Not Found</h2> </cfif> So you have a default missing template handler (the h2 bit) otherwise you serve them the /404.cfm page in the particular site they are viewing. eg. www.a.com/404.cfm or www.b.com/404.cfm Then, if 404.cfm hapens to not exist in www.c.com , then the missingTemplateHandler.cfm kicks in again and you get the H2 part. You could proly do some CFHTTP calls so you don't do lots of double HTTP 302 redirections, but it works pretty well for me. Pat On Sep 12, 1:10 pm, "Steve Onnis" <[EMAIL PROTECTED]> wrote: > where did you put the template? > > _____ > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Scott > Sent: Friday, 12 September 2008 1:06 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > Actually I take that back. > > Browsing 127.0.0.1:84/index.cfm when generating an error works, but missing > template generates a 404 error in IE, but in firefox it generated the custom > template when I browsedhttp://127.0.0.1:84/index1.cfmas it doesn't exist I > got the missing handler been run. > > Is that what you are trying to do? > > For IE to throw an 404 page error mystifies me though, when firefox worked. > > -- > Senior Coldfusion Developer > Aegeon Pty. Ltd. > <http://www.aegeon.com.au/>www.aegeon.com.au > Phone: +613 9015 8628 > Mobile: 0404 998 273 > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Steve Onnis > Sent: Friday, 12 September 2008 12:58 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > I wanting to control the Missing Template Handler, not the Error Template > > _____ > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Scott > Sent: Friday, 12 September 2008 12:56 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > Steve, > > Did a quick test. > > 1) Created a mapping in CFIDE /coldfusionErrorHandling and pointed it > to a directory I created > > 2) Enter that info into the admin section, > /coldfusionErrorHandling/andrewError.cfm > > 3) Run 3 sites on different ports > > 4) Create an index.cfm that will throw an error > > 5) Sit back and watch the error template get executed > > Was that what you were trying to do? Notice I ran this on 3 sites, running > on different ports and even though YOU and CF claim sitewide, the > Administrator as indicated runs when ColdFusion throws an exception. > > Hope that helps anyone else understand this as well. > > -- > Senior Coldfusion Developer > Aegeon Pty. Ltd. > <http://www.aegeon.com.au/>www.aegeon.com.au > Phone: +613 9015 8628 > Mobile: 0404 998 273 > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Steve Onnis > Sent: Friday, 12 September 2008 12:48 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > See the dumb thing is when you set the setting in the CF admin, when it > check to see if the file exists it checks the relative path of where you are > accessing the cfadmin, which is not normally where the sites are set up, so > that makes it even more confusing because you may set it up but then you > need to copy the template you are using into every site for it to work. > > _____ > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Scott > Sent: Friday, 12 September 2008 12:44 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > Well that's why I got confused, I read the settings and the title says site > wide. Yet the descriptive text mentions a relative path to the template. And > even though you may be right, with the mapping may not evaluate at that > point. However, if you have 10 sites running on the instance of ColdFusion > the description would indicate to me that as it states ColdFusion uses this > when an error occurs. Not the site, but ColdFusion. But I have never played > or had to play with those settings. > > That's why I got curious. > > -- > Senior Coldfusion Developer > Aegeon Pty. Ltd. > <http://www.aegeon.com.au/>www.aegeon.com.au > Phone: +613 9015 8628 > Mobile: 0404 998 273 > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Steve Onnis > Sent: Friday, 12 September 2008 12:31 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > Andrew > > "Site Wide" means for that site. If you were going to do something like you > are suggesting you would need a "Server Wide" mapping, which i guess would > be handy for other things like frameworks and stuff that need a mapping to > work. > > Also from what i have seen, the site wide templates in the admin dont work > with mappings as it tries to find the file (although i havent tried it) > > _____ > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Scott > Sent: Friday, 12 September 2008 12:26 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > I was thinking of a site wide mapping though, which would be available to > all straight away. But there is obviously something that I am still not > considering. No big deal... > > -- > Senior Coldfusion Developer > Aegeon Pty. Ltd. > <http://www.aegeon.com.au/>www.aegeon.com.au > Phone: +613 9015 8628 > Mobile: 0404 998 273 > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Steve Onnis > Sent: Friday, 12 September 2008 12:19 PM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: default missing template error file > > Wouldnt i then need to make sure every site has the mapping available to it? > > <BR > > <BR > > <BR --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---