You could also use ISAPI rewrite to do this...Or HTTAccess with Apache (I
don't use it so I cant lend much help).

Basically you set up regex in the config file to look for URL patterns and
it manipulates IIS to server the file you tell it to.

Here is an example of a rule I have running on one of my sites:

#all manufacturers listed with pagination
RewriteRule /brands/(.*)/page:([0-9]*) /\?path=brands&man=$1&page=$2 [I,L]

This rule converts this:
http://www.mysite.com/brands/a-e/page:2
in to this
http://www.mysite.com/?path=brands&man=a-e&page=2

However, in your case you could use something like this:

#for root level files
RewriteRule /(.*).cfm /foo.cfm [I,L]

#for child files in any directory
RewriteRule /(.*)/(.*).cfm /foo.cfm [I,L]

#rinse, wash and repeat...

I found using this far more easy than messing around with the cf
stuff...plus you can use it for far more apps.  It's not free, but it's
worth every dime IMHO!

-Joe


-----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





----------------------------------------------------------
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