Cool, I would have thought that IIS would not send the specified 404 page
back to coldfusion, in the case of it having a cfm extension. I guess it
does. I would need to use that setting "Check that file exists." in the
.cfml extension configuration in IIS, I suppose. Thanks, I'll see if this
will work.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jacob Cameron
Sent: Tuesday, January 25, 2005 5:20 PM
To: [email protected]
Subject: RE: Web Server Redirect On File Extension


Sorry, I've been swamped for days, but I know your solution (I think, I only
skimmed the question and comments).  I just created a site that does this
sort of thing but for another reason.

In IIS set your 404 custom error page to:  notfound.cfm

In my case, here was the notfound.cfm code:
        <cfinclude template="header.cfm">
        <cfquery datasource="#Application.DSN_source#" name="QCon">
                select content, name, pageName from pages where active=1
                        and pageName='#listlast(CGI.QUERY_STRING,"/")#'
        </cfquery>
        <cfoutput>#QCon.content#</cfoutput>
        <cfinclude template="footer.cfm">

Of course yours would be, this logic and code:

Take the default 404 page and paste it into your CFM page and then do a:
<cfif listlast(CGI.QUERY_STRING,".") eq "cfml">
        <cfinclude template="bob.cfm">
<cfelse>
        <!--- It's .html or .cfm or something else --->
        Paste default 404 error page code here.
</cfif>

Pretty easy really, just be sure you do not include a non existant .cfml
page in your cfinclude or you'll probably crash coldFusion and/or the
server.

Jacob

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Daniel Elmore
Sent: Tuesday, January 25, 2005 5:13 PM
To: [email protected]
Subject: RE: Web Server Redirect On File Extension

Yeah I got that setup because both of the extensions need to be processed by
CF but only .cfml needs to load templates when the file doesn't exist,
that's the tricky part. I don't trust ISAPI's much because you usually have
to write them in C/C++ and therefore they have the potential to have memory
leaks and lead to server crashes. I'm sure there's a way to do this in the
web.xml file in CF's J2EE configuration, I need to research that.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Knipp, Eric
Sent: Tuesday, January 25, 2005 3:47 PM
To: '[email protected]'
Subject: RE: Web Server Redirect On File Extension



Here we go .. there is a page in the IIS Admin that you can set .cfml to be
processed by CFMX.  From Web Site Properties, select the Home Directory
panel, and then select Configuration.  You can force .cfml, or .blah to get
processed by the same thing that handles .cfm requests, that should work.
Looks like for MX that the default is to process .cfml anyway.

Eric



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Daniel Elmore
Sent: Tuesday, January 25, 2005 3:23 PM
To: [email protected]
Subject: RE: Web Server Redirect On File Extension


Okay, thanks, I see how it's used now. I however would need this to work
only for .cfml files and not .cfm files. I know these are crazy
requirements, thats why I was looking for something at the web server level.
Thanks for your time and thoughts.

Daniel Elmore


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Knipp, Eric
Sent: Monday, January 24, 2005 4:48 PM
To: '[email protected]'
Subject: RE: Web Server Redirect On File Extension



Check out:

http://www.unitrinspecialty.com/chickenmcnuggets.cfm

This is not a real page.  Your URL will not be changed, but you will see a
ColdFusion template, which is the site-wide missing template handler for us.

In your case you could include a page here that includes whatever you need.

Thanks,

Eric

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Daniel Elmore
Sent: Monday, January 24, 2005 2:04 PM
To: [email protected]
Subject: RE: Web Server Redirect On File Extension


Eric, that sounds promising, I have been confused about the template
handler, perhaps you can help. The description of it in the CF admin cracks
me up because the grammer is so bad I can't even understand it's purpose.

"Specify the relative path to a template to execute a cfinclude tag cannot
find a requested template."

It's seems to say that it will only execute on a failed <cfinclude
template=""> call, this will not help my problem, if that is true.

Thanks for your time


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Knipp, Eric
Sent: Monday, January 24, 2005 1:48 PM
To: '[email protected]'
Subject: RE: Web Server Redirect On File Extension



Hrm, then you could put something in the site-wide missing template handler?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Daniel Elmore
Sent: Monday, January 24, 2005 1:40 PM
To: [email protected]
Subject: RE: Web Server Redirect On File Extension


Yeah it seems like that would work, but all the of the .cfml files that are
going to be requested, they do not exist. They are I guess, fake file names.
Sorry I should have said that first.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Knipp, Eric
Sent: Monday, January 24, 2005 1:26 PM
To: '[email protected]'
Subject: RE: Web Server Redirect On File Extension



This is going to seem cheesy, but in the application.cfm, couldn't you check
the name of the page and based on that perform your include?

Eric

-----Original Message-----
From: Daniel Elmore [mailto:[EMAIL PROTECTED]
Sent: Monday, January 24, 2005 1:23 PM
To: [email protected]
Subject: Web Server Redirect On File Extension


I need to redirect all requests for .cfml files to one particular .cfm file.
When the user goes to www.mysite.com/test.cfml  the url should not change
but should instead load cfml_files.cfm. (I guess this isn't a true redirect
but more of wildcard include). I am not using apache but IIS, I know that
would have make this easier. Is there a way to do this in CFMX's xml
configuration files?

Thanks!
Daniel Elmore


----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm


-----------------------------------------
CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited.  If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.

----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm


-----------------------------------------
CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited.  If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.

----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm


-----------------------------------------
CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited.  If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.

----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm


-----------------------------------------
CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited.  If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.

----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm




----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to