Most CF Hosting companies give you at least one mapping, one that represents
your ownership. So you use that for your request.cfroot and subsequently in
all your cfmodule or include calls that are not easily referenced relative
to the directory of the page currently being processed. I use (at work)
urlstring = cgi.path_info;
urlstring = reverse(urlstring);
urlstring = mid(urlstring, find("/", urlstring, 1), len(urlstring));
urlstring = reverse(urlstring);
request.pathinfo = urlstring;
in app_globals or app_server. Every subordinate circuit bubbles up the
chain of directories via app_local and eventually gets to this code. Now I
use request.pathinfo to point to my current circuit. Sor for modules or
includes you might see
<cfmodule template="#request.cfroot##request.pathinfo#displayers/test.cfm">
or for a non-cf command you might see
<img src="#request.pathinfo#images/test.gif">
Does that help? I know its not the prettiest but this was set up quite a
while ago at the office where I contract and it sort of stuck...and it
really does work...just not look very pretty.
Mike Craig
-----Original Message-----
From: Stephen Morse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 8:10 PM
To: Fusebox
Subject: Unable to use Mappings
Hello everyone,
I have inherited a very complex fusebox app that we have to host off-
site.The hosting company that we are going to use doesn't allow us
to create mappings. Without that ability I would have to manually
change all the "/siteroot" references to a relative path. I started to
play with doing it dynamically, but I'm over my head with regular
expressions.
Has anyone played with creating relative mappings from the current
siteroot and cgi.path_info (or cgi.script_name? Before I bang my
head on regular expressions any more I thought I would see if
someone else has already solved this problem.
Hope someone can help.
Stephen Morse
ICQ # 67478942
AIM knightcloak2k
"I love Mickey Mouse more than any woman I've ever known."
--Walt Disney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists