Today I needed to enable the server-level search engine safe (SES) urls on a ColdFusion MX 6 server.
In the past I’ve referred to an Adobe technote for this. This technote shows how to accomplish this by adding a few servlet mappings to web.xml of the server.
I wanted to add the same mappings to a CF 6 server to enable SES urls. Howver, for some strange reason, the technote shows a screenshot of these mappings, which means that I can’t simply cut and paste them into my web.xml.
So here are the nodes for these mappings as “text” rather an “image”.
<!--If your J2EE server supports it, you can uncomment these.They are included to support Search Engine Safe (SES) URL types.Some servers (Tomcat, SunONE) don't support wildcard mappings--> <!-- begin SES --> <servlet-mapping id="macromedia_mapping_11"> <servlet-name>CfmServlet</servlet-name> <url-pattern>*.cfml/*</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_12"> <servlet-name>CfmServlet</servlet-name> <url-pattern>*.cfm/*</url-pattern> </servlet-mapping> <servlet-mapping id="macromedia_mapping_13"> <servlet-name>CFCServlet</servlet-name> <url-pattern>*.cfc/*</url-pattern> </servlet-mapping> <!-- end SES --> </pre>
Add these to the web.xml of your server, restart the server instance, and the any application (like BlogCFC) that makes use of search-engine safe urls will start working nicely.