"Search Friendly URLs" with CFMX/IIS

Posted by Dan on Apr 17, 2003 @ 2:38 PM

In order to get "Search Friendly URLs" working in CFMX under IIS, make sure you've done the following:

  • In the cfusionmx\wwwroot\web-inf\web.xml file, make sure that you have a mapping pattern that will make sure to parse content after the .cfm extension. For example:

    <servlet-mapping>   <servlet-name>CfmServlet</servlet-name>   <url-pattern>.cfm*</url-pattern> </servlet-mapping>
    By default, CFMX Updater 3 out to have mappings like this in the web.xml file. If those mappings don't work, you can try a generic mapping to have the servlet parse everything:

    <servlet-mapping>   <servlet-name>CfmServlet</servlet-name>   <url-pattern>*</url-pattern> </servlet-mapping>
  • You may need to run the "Remove_ALL_connectors.bat" file located in the cfusionmx\bin\connectors. Try skipping this step first (especially if you have a lot of virtual servers already set up.) If things don't work the first time, try running this batch file. After running this batch file, you'll need to run the "IIS_connector.bat" in the same directory to reset all the associations to JRun and ColdFusion.
  • Go to the Internet Service Manager MMC console and pull up the properties for each virtual server (and the default web server as well.) You'll need to go to the "Home Directory" and click on the "Configuration" button. Go through the list of ISAPI applications loaded and look for anything calling the "CFusionMX\runtime\lib\wsconfig\1\jrun.dll" filter (ie. cfm, cfml, jsp, etc.) You'll need to edit the properties for the filter and make sure that the "Check that file exists" option is unchecked. If you check this option, IIS will attempt to see if the template being called exists—which it won't because it'll look for a file with all that extra stuff after the .cfm extension in it.
    If the jrun.dll is not associated with any templates, you'll either need to delete the virutal server entry and recreate it or simply manually add the associations for any of the file types you may use. The key ones are for the following extenstions: cfm, cfml, cfc, jsp.
  • Restart the computer or recycle the W3SVC and CFMX App Server services and things should be working properly.

That should get you up and running. For some reason I forget this everytime I set up a CFMX box. I probably forget about it because I never used to have to do anything special to get it working in other ISAPI filters. Anyway, I hope you find this useful.

Categories: HTML/ColdFusion

Add Comment

Leave this field empty