httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Image Replacement
Date Wed, 24 Apr 2002 06:27:44 GMT
Brian Quinn wrote:
> 
> Sorry if this is not something that Apache can do.  If it's not, please
> just reply off the list.
> 
> I have a set of static HTML pages. Each page calls an Image file on the
> machine that is updated automatically every few minutes. The problem is,
> sometimes the image isn't available so a file with the image name is
> created with a files size of 0kb. When someone clicks on the page they get
> that little box that show's a broken image. Is there a way with either an
> Apache config change, SSI, PHP comand, HTML, or something that if that
> image is 0 it would display another image (like a static Image i create
> saying to check back again shortly or something) ?  I only want it to
> effect 1 directory of
> html pages though, the rest can stay as they are.

If the image has a predictable name then you might be able to arrange
something with a conditional rewrite rule, e.g.

RewriteCond  -s /path/to/banana.png
RewriteRule  /banana.png         /no_image_available.png

I've never tried this, but from the mod_rewrite docs (hint, hint) it
looks like it should work...

Rgds,

Owen Boyle

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message