View Full Version : redirecting image from other file

03-30-2010, 01:00 AM
I hope i opened this in right place.

is it possible, when certain image is posted on my forum, to change it to another image.
for example

to mysite.com/logo.gif

I was told it is possible with .htaccsess but I only found tutorials that help you prevent others from using images on YOUR site.

if it is not possible to redirect, is it possible to block it?

03-30-2010, 09:48 PM
Yes this is possible, do you know if your server has a module called mod_rewrite?

Try putting this in a file called ".htaccess" in the directory that contains the image.

RewriteEngine on
Rewrite old.jpg new.jpg

It is not possible to change external images, ie: if the source image is on another server, by using rewriting. However, most forums have support for "censoring", you can add a "bad word" with the URL to the bad image and replace it with something else. It's quite effective.