The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Image replacement.

Discussion in 'General Discussion' started by blanksugar, Feb 9, 2009.

  1. blanksugar

    blanksugar Registered

    Joined:
    Feb 9, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hey =)

    So, I have been looking EVERYWHERE for help with this.
    I'm not even sure if it can be done from the cPanel or not.
    (I'm thinking it would though)

    I have done searches on this forum too so I don't accidentally start a thread that already exists, but, I could not find anything.. If there already is a thread or if I am posting in the wrong spot I apologize.

    Here is what I am looking for...

    I have a lot of images that have been moved or deleted and I was wondering if there was a way to get a "default" image of some sorts to replace it. (kinda like how on Photobucket they replace the image with "This image has been moved or deleted") I have a lot of graphics out there and I am trying to re-organize everything but I don't want the people that have the graphics to feel they are lost, something to let them know to come back to the site and get it again and so they just don't see a big x.

    If anyone knows how to do that I would be most appreciative.
     
  2. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    You could use mod_rewrite to do it, but I believe that it would be somewhat inefficient as you would have to check every single request.

    Something like this should get you started, but by all means I am not a mod_rewrite expert and this may or may not work and/or need some tweaking.

    Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+\.(png|gif|tif[f]|bmp|dib|jp[eg]|jpeg))$ http://images.example.com/404.png
     
    #2 Voltar, Feb 9, 2009
    Last edited: Feb 9, 2009
  3. blanksugar

    blanksugar Registered

    Joined:
    Feb 9, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hmm. Thanks, I will give it a try. I'm always up to at least try things.
     
Loading...

Share This Page