Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    redirecting image from other file

    hi,
    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
    Code:
    http://www.google.com/intl/en_ALL/images/logo.gif
    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?

  • #2
    Regular Coder xconspirisist's Avatar
    Join Date
    Jun 2006
    Location
    Great Britain.
    Posts
    138
    Thanks
    1
    Thanked 6 Times in 6 Posts
    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.

    Code:
    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.
    Last edited by xconspirisist; 03-30-2010 at 08:57 PM.
    If I have been helpful, use the "thank" button - It makes me happy!

    xconspirisist.co.uk - homepage of my online alias
    technowax.net - a community for people interested in all forms of modern technology.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •