Conflicting mapping for two ColdFusion applications

I spent more than a day solving a problem when two applications use the same relative paths but are under a different “root”, and this leads to the fact that the wrong code base is available for one of the applications.

These are my roots for two applications:

  • \ WWW \ Clients \
  • \ WWW \ Other \ Clients \

Structure

..www 
....Clients 
......Application.cfc 
....Other 
......Clients 
........Application.cfc

Both applications have code that refers to a relative path (e.g. / clients / content / login.cfm)

I noticed that the ColdFusion administrator has a Mappings section in which the first mapping has a logical path /mapped to a directory D:/www/.

, clients www, , . /clients/content/login.cfm Others www.

. Application.Name, .

- , ColdFusion 9, ColdFusion 2016.

ColdFusion, , , .

, ? ColdFusion 9 ColdFusion 2016?

+4
1

ColdFusion, , .

: .

<cfset this.mappings["/Clients"] = GetDirectoryFromPath(GetCurrentTemplatePath())>

+2

Source: https://habr.com/ru/post/1674581/


All Articles