View Full Version : How to set .htm or .html files to process ColdFusion

August 20th, 2009, 09:25 PM
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.

NOTE: This will affect every site on the server, so use cautiously.

First, you will need to edit the web.xml file located generally at C:\ColdFusion8\wwwroot\WEB-INF

Open this file and look for:


Then right above this line you will see something like:

<servlet-mapping id="macromedia_mapping_1">

Scroll down the file until you see the last number increment like:

<servlet-mapping id="macromedia_mapping_14">

Then add the following right below the closing </servlet-mapping> of the last number increment item:

<servlet-mapping id="coldfusion_mapping_15">
<servlet-mapping id="coldfusion_mapping_16">

Save this file and exit.

Now in IIS, setup a mapping for the site.

If using IIS6, go to the WWW section, find the site, right click select Properties. Click on the "home directory" tab, click on the configure button, under mappings, select and "edit" the .cfm record and copy the value of "executable". Now hit Cancel and then click Add to add the new mapping. Paste the executable value copied from the .cfm record and then , put ".htm" (or .html, whichever you are using) into the extension and hit OK (leave as all verbs).

Now restart the ColdFusion service and IIS. It should now work.