Perhaps something like: <cfif IS_LOCAL> <cfset strDocumentRoot = ExpandPath( "../../A/" ) /> <cfelse> <cfset strDocumentRoot = ExpandPath( "../A/" ) /> </cfif>
<cfcontent file="#strDocumentRoot#YOUR_DOC_HERE.doc" /> Where the IS_LOCAL is a boolean as to whether the current enrivonment is Dev or production. As far as how to set that value, you can do a number of things. You can hard code it. You can check the CGI values (server name, http host???), you can check the requested Url. Right now I go with the CGI.server_name I think (but I can't remember off hand). ...................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 4:38 PM To: CF-Talk Subject: path outside webroot We have a document storage requirement...and we want to store the files outside the webroot and deliver them via cfcontent, in order to prevent hotlinking of files and added security, etc. We have our testing server, and our live server for example. The paths on each will be different. How can I write it so it dynamically will know what the base root for that folder structure outside the webroot is? Start with webroot and ../ up? Best way to do it? Some opinions most certainly welcome as we have not really fired this architecture up before!! Thanks! -------------------------------------------------------- Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4105 fax: 651.717.4115 mob: 651.245.2717 Adobe Solutions Partner Microsoft Certified Partner -------------------------------------------------------- This message contains confidential information and is intended only for cf-talk@houseoffusion.com, [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com, [EMAIL PROTECTED] you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262814 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4