So why does the mapping in CFADmin work if I set that up? That is all I am doing, just at an application level...that doesn't make sense... When CF renders the page, it should render the mapping, just like it would render a variable.
Eric On Tue, Nov 26, 2013 at 12:54 PM, Jon Clausen <[email protected]>wrote: > > Since your image files are being served by the web server, not by > Coldfusion, you will have to create a new variable to hold your image > directory prefix, or you will have to create an Alias for your web server > to honor. For Apache, in your <VirtualHost> directive for the site you > would specify: > > Alias /cup/ /er/cup/ > > CF mappings are only recognized by the CF server. If youre trying to > change that directory dynamically, you can serve via cfcontent. > > Jon > > > On Nov 26, 2013, at 1:36 PM, Eric Roberts <[email protected]> > wrote: > > > > > I am trying to set up some local mappings (CF9) and it doiesn't seem to > > recognize it. I have this as part of several variables that are set > before > > the 1st function in my application.cfc... > > > > <cfset this.mappings[ "/cup" ] = "#application.cuproot#/cup"> > > > > > > > > For instance...when I try to access an image in a directory (the path > from > > the root is /cup/images/image.png), I call <img > src="/cup/images/image.png" > > />, instead of mapping it like i would expect it to, it just appends the > > server url and i get something like > > http://www.xxx.com/cup/images/image.pngwhen it should be > > http://www.xxx.com/er/cup/images/image.png. I have dumped > > application.cuproot and it has the appropriate value. It just seems to > be > > ignoring the fact that i am setting up a CF mapping, If I do the mapping > > in cf admin...it works as expected. > > > > Eric > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357148 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

