Jump to content

Default image


damiancds

Recommended Posts

I'm not sure if it can be done with .htaccess (not really sure what it's capable of or best used for), but I'd like to load an image by default and replace it with the expected image if it's found.basically load an image (a little square stating image not found) and if it finds the right one, load that over top of it.or only load the not found image when the normal image isn't found.Again, not really sure if .htaccess is meant for this sort of thing, and if not, what should I do it with?Thanks,

Link to comment
Share on other sites

Something similar to this might work:RewriteEngine OnRewriteCond \.(gif|jpe?g|png|ico)$ !-f # If an image file is requested, but the file doesn't existRewriteRule .* default.jpg [L] # Rewrite the request to deliver a default image

Link to comment
Share on other sites

  • 2 weeks later...

Unfortunately, it didn't work. I think that if I had the right permission, it would (I've been reading on a related matter, and I think I would have to have access to http.conf or something - which I can't find)Either way it results in an internal server error.It's really no big deal, i mean about the image thing, not the internal server error.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...