Try this in your application.cfm (must be in the application root):
path = GetDirectoryFromPath(GetCurrentTemplatePath());
path = ReplaceNoCase(GetBaseTemplatePath(),path,"");
path = ReplaceNoCase(path,"\","/","ALL");
path = ReplaceNoCase(CGI.Script_Name,path,""); path=
"#ListFirst(CGI.SERVER_PROTOCOL,"/")#://#CGI.SERVER_NAME##path#";
-----Original Message-----
From: Ben Densmore [mailto:[EMAIL PROTECTED]]
Sent: donderdag 17 januari 2002 16:41
To: CF-Talk
Subject: Getting absolute path
Can someone tell me how you can get an application.cfm file to use
cflocation to redirect to an absolute path. Right now I just hard code
the url but it's a pain when I put the application from machine to
another to run locally and have to change the url. I have tried using
GETDIRECTORYFROMPATH(CGI.CF_TEMPLATE_PATH) but it returns the physical
path i.e c:\inetpub\wwwroot\mydirecotryname
what I need to do is have it point to http://localhost/mydirectoryname
instead so that if someone copies the netire directory over their
machine they don't have to make any changes at all to that cflocation
tag.
Thanks,
Ben Densmore
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists