Copy link to clipboard
Copied
Pretty basic question, but I have had a complete brain dump...
My application.cfc mappings work great...
on cfc calls, queries, cfincludes... basically any CFM related activity.
But they do not resolve on a <img src='\mappeddir\image.png'> when mappeddir is the correct mapped directory
(and a "fileexists or expandpath on that mappeddir shows the image does exist -- but then I have embedded the mapping inside a CF function :|)
Am I missing something in the naming reference, or are there general "non-cf" conditions when a cf application mapping would not fire to the correct directory?
Tx, Tami
Mapped directories are referenced within CF code. In your case that is a HTML image tag. The browser hits your webserver and asks it for /mappeddir/image.png but your web server has no knowledge of CF mapped directories so it returns a 404. You can add the same mapping in your webserver if you like, and then it will know how to handle those paths.
In apache you would do something like:
Alias /mappeddir "/Some/Absolute/Path"
<Directory "/Some/Absolute/Path">
Options Indexes MultiViews FollowSymLin
...Copy link to clipboard
Copied
Mapped directories are referenced within CF code. In your case that is a HTML image tag. The browser hits your webserver and asks it for /mappeddir/image.png but your web server has no knowledge of CF mapped directories so it returns a 404. You can add the same mapping in your webserver if you like, and then it will know how to handle those paths.
In apache you would do something like:
Alias /mappeddir "/Some/Absolute/Path"
<Directory "/Some/Absolute/Path">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
In IIS you would create a virtual directory.
Copy link to clipboard
Copied
Yea... I know... was just hoping there was some magic fairy config that I could set up. Since only a few images are not references dynamicaly, the case for mapping on this project is low...
thanks Sean for confirming -- but magic fairy config would have been awesome
T--