Andy Jarrett // Code. Develop. Manage.

Unique CF Application name per app

There's been a thread running on CF-Talk about CFApplication name in a shared hosting enviroment. WIthout going into the actual thread discussion, Mosh Teitelbaum posted a dynamic naming solution. The only bit i've changed in the code below from the original is making the replace() into a reReplace() and also converting a ":" into an underscore "_"
<cfset cfapplicationName = Right(reReplace(GetDirectoryFromPath(GetCurrentTemplatePath()), ":|\\\\", "_", "ALL"),64) />
Update: Sean Corfield has an excellent Post about the actual thread
I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee.
Your support keeps this site running and the coffee brewing! ☕️