Jump to content

using mod_rewrite on broken images?


Tubby

Recommended Posts

Hello,

I host a lot of images that people use on forums and am moving servers, but instead of moving all the images too I thought I\'d clear out and delete them all, but instead of just deleting them so they all show as red x\'s on forums I would like it to show an image telling people how to get the broken image re-instated.

 

So basically, I want to use mod_rewrite in .htaccess so if an image is linked to and it dosent exist I want it to show a default image.

 

I\'ve tried this so far but it dosen\'t work:

 


Options +FollowSymLinks 

RewriteEngine on 

RewriteCond %{REQUEST_URI} !-U 

RewriteRule .(gif|jpg|jpeg)$ [url]http://domain.tld/rolleyes.gif[/url] [L] 

(with my domain)

Am I going about it all wrong?

 

Suggestions / ideas please.

 

Thanks. :)

 

(is this the right forum for posting this question in?)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.