Today, I had a client that had an existing site that was designed with the idea that obfuscating the fact that ColdFusion was being used made the site more secure. To this end most of the pages were HTML but needed to be rendered by the ColdFusion 9 server. I found lots of documentation on doing this with IIS 6, but nothing concrete for IIS 7.5 and the process is quite different.
Here is the proceedure:
- Edit web.xml add add the following entries:
NOTE: MAKE SURE THE MAPPING ID IS UNIQUE.
- Create a custom handler in IIS for *.html
- Select “Handler Mappings“
- Select “Add Module Mapping” from actions column.
- Request Path: *.html
- Executable: C:\JRun4\lib\wsconfig\jrun_iis6.dll (For CF 9 multi-server. This will be slightly different for each flavor of CF. Check the handler mapping for *.cfm and copy that executable.)
- Name: Pick a unique name like: HTML2CFMLCustomHandler
- Restart ColdFusion and IIS.
- If you are using IIS 6 here are some great instructions: