can't configure server side includes with coldfusion
Copy link to clipboard
Copied
Hi,
I've a client that wants to use server side includes (SSI) and coldfusion on the same site.
I can get either to work, but not both at the same time. If it was me, I'd just use cf and cfinclude, but that's not an option.
We're running IIS7.5 on Windows 2008, cf9.01. The web.config is:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package zip" />
</staticContent>
<handlers>
<add name="SSINC-htm" path="*.htm" verb="*" modules="ServerSideIncludeModule" resourceType="Either" requireAccess="Script" />
<add name="SSINC-html" path="*.html" verb="GET,POST" modules="ServerSideIncludeModule" resourceType="File" requireAccess="Script" />
<add name="JWildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll" resourceType="Unspecified" requireAccess="None" />
<add name="hbmxmlHandler" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfswfHandler" path="*.cfswf" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfrHandler" path="*.cfr" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfcHandler" path="*.cfc" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfmlHandler" path="*.cfml" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfmHandler" path="*.cfm" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="jwsHandler" path="*.jws" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="jspHandler" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="D:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
</handlers>
<defaultDocument>
<files>
<add value="index.cfm" />
</files>
</defaultDocument>
<httpErrors existingResponse="PassThrough">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.cfm/this-will-force-a-404/" responseMode="ExecuteURL" />
</httpErrors>
<security>
<requestFiltering>
<denyUrlSequences>
<remove sequence="/CFIDE/scripts" />
</denyUrlSequences>
</requestFiltering>
</security>
</system.webServer>
</configuration>
I've narrowed the problem down to the wildcard handler mapping. If I comment it out, the SSIs work on html pages, but I then get a server error requesting .cfm pages.
With the wildcard mapping in, cfm files run fine, but the html files don't run the includes.
Has anyone any suggestions? There must be something in the wildcard handler that's affecting the html files.
Thanks in advance,
G
Copy link to clipboard
Copied
Just to add, I've realised that .html files are actually being processed by coldfusion.
Copy link to clipboard
Copied
You generally can't have one file processed by two server-side engines. CF and SSI are both server-side engines. The web server can send the file to one engine or the other for processing, but typically not both.
Dave Watts, CTO, Fig Leaf Software
Copy link to clipboard
Copied
Thanks Dave, but I don't want the .html files processed by both server-side engines - just SSI. For some reason, the html pages are being processed by coldfusion instead. I can't figure out what's wrong with the configuration.
Copy link to clipboard
Copied
This is the set of steps that you'd go through to process non-CF files with CF:
http://www.talkingtree.com/blog/index.cfm/2006/2/17/CF-Custom-File-Extensions
You can reverse these changes to disable that functionality.
Dave Watts, CTO, Fig Leaf Software
Copy link to clipboard
Copied
Thanks Dave
It seems the web.xml file had been changed to process .html files.
I'm presuming this must have been done on purpose for one of the sites on the server, so I'll have to leave it for now.
Message was edited by: gareth_cole. Meant web.xml NOT web.config

