As you may have noticed on pages like Google, you will see that they have a program called ‘search?’ and many people have wondered how you can run a Coldfusion page without any extension to mimic that.
The reasons can be for Security, because they don’t want people to know they are running CF, or just for clean looking links.
I personally am not an advocate of Extensionless Coldfusion but the demand has been such that it should be addressed.
What you need:
You need access to the Apache httpd.conf file OR the IIS6 MMC Snap in
You need access to the Coldfusion default-web.xml
and you must be able to restart the ColdFusion and Apache service.
There are two parts to setting this up, one is the configuration of your web server, and the second is the configuration of Coldfusions web.xml.
In Coldfusion 5 you would just pass a file to Coldfusion and Coldfusion would try and process it, so you could tell IIS to pass *.myFiles to Coldfusion and Coldfusion would happily try and render it.
In Coldfusion MX the principle is a little bit the same, but you have to set the default-web.xml to listen for the files extension.
So what we are going to do is tell Apache/IIS to pass the Jrun mod our file, and then have Jrun process it and pass back to Apache/IIS to be served up as rendered html
The catch quite simply is that with this technique you cannot just upload any extensionless file and expect Coldfusion to run it, you have to explicitly declare each file and its name in Apache/IIS AND the default-web.xml, so if you have 10 pages you wish to make extensionless, you have to add that name to both sources and restart the services.
Another Interesting caveat is that if you have
http://www.mysite.com/myFile.cfm/id/360 , this will become
In Apache on Windows and Linux you can get away with this however on IIS you can’t as it treats MyFile as a directory as opposed to a file, where as apache will check, because on both windows AND Linux you cannot have a file and a directory of the same name.
Both IIS and Apache can handle http://www.mysite.com/myFile?id=360
Our test page:
For our test we will be using a file called ‘service’ which will be a Coldfusion text file
Modifying Apaches httpd.conf
Open your httpd.conf file in your favorite text editor and find the section of code that looks like this
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun20.so"
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
On the AddHandler line, add the name of your file, so in our case it will be ‘service’
It should resemble this
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc service
Save this file and restart your Apache installation
Open up the IIS MMC snap in from the Administrative Tools folder and browse to your website.
Right click the website and click properties.
Click the Home Directory tab and then click the Configuration button under Application Settings
You should see a box at the bottom called “Wildcard Application Maps” and in there is listed is
If you don’t see that, then just add it. Press OK to take you back to the properties screen and press the HTTP Headers tab, and then click the Mime Types button, then click New.
In the Extension box, put ‘.*’ and then in the MIME Type field put in
Press OK and then OK again, Just for good measure, restart IIS (though you shouldn’t have to).
Modifying Coldfusions default-web.xml file
Open <CF_SERVER_ROOT>\runtime\servers\default\SERVER-INF\default-web.xml in your favorite text editor and under <description> Settings</description> add this
Save the file and restart Coldfusion
The Service file
Create a file called Service and copy and paste this
<head><title>Extentionless CF Test</title></head>
<p><font face="Tahoma" size="6">Extenionless Coldfusion Test</font></p>
<form name="myForm" action="service" method="POST">
What is your name : <input type="text" name="yourname">
<input type="hidden" name="action" value="go">
<input type="submit" name="submit" value="submit">
Save the ‘service’ file and upload to your coldfusion server and then go to
You should now see a fully rendered CF page used without extensions!
What this has been tested on:
Windows Server 2003 Standard with ColdFusion MX 6.1 and IIS6
Windows XP Professional with Coldfusion MX 6.1 and Apache 2.05
Redhat Linux 9 with Coldfusion MX 6.1 and Apache 1.3