ColdFusion MX 7 has added entries to the web.xml file to help search engines index ColdFusion based sites. By default, the settings are commented out since not all application servers support the wildcard mappings that are used. This TechNote describes why you might want to use these new mappings and how to turn them on.
When public search engines spider web pages, most of them will skip dynamic pages that have a query string in the URL. Application developers somtimes use Search Engine Safe URLs to encourage search engines to index dynamic web pages that they would otherwise skip.
SES URLs pass variables using slashes as opposed to the default url patterns. An example URL might look like the following: http://mysite/mytag.cfm/123/abc.
To get the variables from the URL, you might use ReReplaceNoCase(SCRIPT_NAME, '.+\mytag.cfm/?', '')
The above function will return the variables passed into the page, if any. In the example above, we would get 123/abc. At that point we would need to work with the list in your tag.
Passing variables using this technique will improve how search engines index your site.
J2EE application servers that support wildcard mappings can utilize the SES URLs. Presently, Tomcat and SunOne are known to not support the wildcard SES mappings. For all other application servers, you should be able to use SES URLs by uncommenting the mappings below.
In the cfmx7_root/WEB-INF/web.xml, you will see a section similar to the following:
The web.xml file is found in one of two places:
- Standalone Install:cf_root\wwwroot\WEB-INF
- EAR\WAR installation:application root\cfusion-ear\cfusion-war\WEB-INF
The mappings will be implemented once the change to the web.xml file has been made and the application server is restarted.