Apache 2.4/Lucee 5/Handle files without extensions

I apologize if this is previously asked topic, I did search and found
similar requests but nothing that helped with my situation. I am running
Centos 7/Apache 2.4/Lucee 5 (default install using Tomcat). Site is running
beautifully (and very fast). My only issue is I had a rewrite rule on IIS 7
(previous install location) for all files without an extension to be
rewritten as a .cfm file and handled by coldfusion. I cannot for the life
of me figure out how to do this with my current setup.

I wish to rewrite all files of the form http://www.domain.com/bag
http://www.domain.com/bag.cfm

I understand that mod-rewrite won;t work due to the Tomcat hand-off. Any
guidance/help would be greatly appreciated.

What do you mean when you say Apache’s mod_rewrite won’t work? If you
rewrite bag to bag.cfm, it should work fine.

That said, you’d probably get better help and meet less resistance if you
followed one of the more standard approaches to this which would be to
rewrite URLs like /bag to /index.cfm/bag and then you can deal with
cgi.path_info to parse the “bag” part.

This is basically how every CF framework like ColdBox, FW/1 operate.

Thanks!

~BradOn Friday, December 2, 2016 at 4:56:45 PM UTC-6, @adminprotools wrote:

I apologize if this is previously asked topic, I did search and found
similar requests but nothing that helped with my situation. I am running
Centos 7/Apache 2.4/Lucee 5 (default install using Tomcat). Site is running
beautifully (and very fast). My only issue is I had a rewrite rule on IIS 7
(previous install location) for all files without an extension to be
rewritten as a .cfm file and handled by coldfusion. I cannot for the life
of me figure out how to do this with my current setup.

I wish to rewrite all files of the form http://www.domain.com/bag
http://www.domain.com/bag.cfm

I understand that mod-rewrite won;t work due to the Tomcat hand-off. Any
guidance/help would be greatly appreciated.

I am not using any frameworks and no the standard mod_rewrite such as
below does not work unfortunately

RewriteRule ^(.*)$ $1.cfm

which is essentially what I am using on the previous CF9 site but does not
work as Apache hands off cfm files to Lucee/Tomcat via mod_proxy which
happens before mod_rewrite is accessed so yes the rewrite rule above
actually does work but then Apache does not know what to do with the
rewritten file bag.cfm so throws a file not found error.On Friday, December 2, 2016 at 6:47:55 PM UTC-5, Brad Wood wrote:

What do you mean when you say Apache’s mod_rewrite won’t work? If you
rewrite bag to bag.cfm, it should work fine.

That said, you’d probably get better help and meet less resistance if you
followed one of the more standard approaches to this which would be to
rewrite URLs like /bag to /index.cfm/bag and then you can deal with
cgi.path_info to parse the “bag” part.

This is basically how every CF framework like ColdBox, FW/1 operate.

Thanks!

~Brad

On Friday, December 2, 2016 at 4:56:45 PM UTC-6, adminp...@gmail.com <javascript:> wrote:

I apologize if this is previously asked topic, I did search and found
similar requests but nothing that helped with my situation. I am running
Centos 7/Apache 2.4/Lucee 5 (default install using Tomcat). Site is running
beautifully (and very fast). My only issue is I had a rewrite rule on IIS 7
(previous install location) for all files without an extension to be
rewritten as a .cfm file and handled by coldfusion. I cannot for the life
of me figure out how to do this with my current setup.

I wish to rewrite all files of the form http://www.domain.com/bag
http://www.domain.com/bag.cfm

I understand that mod-rewrite won;t work due to the Tomcat hand-off. Any
guidance/help would be greatly appreciated.