NYCPHP Meetup

NYPHP.org

[nycphp-talk] Server Path for HTML IMG SRC?

Stephen Musgrave stephen at musgrave.org
Tue Mar 29 13:13:15 EST 2005


Hello List -

Is there a way, maybe an Apache directive in .htaccess, to instruct an 
HTML page to look for an image resource if multiple directories without 
using PHP?

I have an issue where there is a file that sits in /events/file.php and 
it includes images that sit in /events/images/.  File.php is also 
included in /otherevents/ and the paths to image assets are relative in 
file.php, causing the images to 404 because they are looking for the 
images in an images directory that doesn't have that particular asset.

Is there a way to instruct Apache to serve up images from another 
directory should it not be found at the path that is defined as the img 
src?

Thanks,

Stephen




More information about the talk mailing list