All Collections
ColdFusion
Per-Application ColdFusion Mappings
Per-Application ColdFusion Mappings
Updated over a week ago

In ColdFusion 8 and newer, it is possible to create per-application mappings through your site’s Application.cfc file. This is accomplished with the following setting in your Application.cfc configuration file.

this.mappings["/test"]="d:\home\yourdomainname.com\wwwroot\test";

On your site, you would need to change /test to the name of your mapping.

IMPORTANT:
You need to include the forward slash before the name of your mapping. You will also need to change d:\home\yourdomainname.com\wwwroot\test to the full physical path to the folder you wish to map.

Note:
For Hostek.com customers, the physical path to your site’s root is listed in the “Site Settings” of your control panel at wcp.hostek.com.

To include a template named “testing.cfm” in the “test” directory we just mapped, you would use this line:

<cfinclude template="/test/testing.cfm">
Did this answer your question?