I’m having an issue with getting coldfusion to pro...
# adobe
s
I’m having an issue with getting coldfusion to process HTML files with CFML in them
w
couldn't you just use a rewrite rule to rewrite .html to .cfm in IIS? assuming that works, which it should, you wouldn't have to mess with any config other than the rewrite
j
@salted first off, why do you have html files with CFML code in them? secondly, the easiest thing is to rename your pages to .cfm so that ColdFusion will process the page. Otherwise if you must have html pages with CFML code, perhaps use an iframe in the html to include the cfml from a CFM page.
d
I know I am late to the part here. However, I don't normally question why someone does things. But, this one, I would. Having CF process html files with code in them just sounds all kinds of bad. If something happens, you run the risk of having raw, un-processed code, getting sent directly to the browser. You also have reconfigure lots of things to treat html as if it is CF. It would be much cleaner and easier to use rewrite rules so you can use html links but rewrite them to CF code.
p
@salted I haven't tried this in recently, but I will check and let you know.
s
Sorry I’m late to replying here @justincook/ @dfgrumpy this is a legacy site that was previously running on cf 2016 that was processing the html with cf in them (connected to IIS), I was merely updating to cf 2021 and it lost that capability so rather than spending any length of time on it simply replicating the environment it was previously working in was the most expeditious and cheap.
👍🏻 1
p
@salted Sorry about the delay, I tried the same and I am able to run them without any issue.
Here I am sharing the doc with screenshot so you can implement at your end.
s
Hi Priyank, it’s all good I managed to get it working - I had forgotten to assign the worker (I had *.html but forgot the =cfusion)
👍 1
p
3 Steps, 1 Html handler in IIS, uriworker properties entry for .html and web.xml has an entry