Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3304478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:03:58+00:00 2026-05-17T21:03:58+00:00

I don’t know if this is possible or not, I have an image host

  • 0

I don’t know if this is possible or not, I have an image host that I’ve made myself. I need some last tweaks with it.

Whenever an image has been deleted or is an invalid image url, it should replace with an 404 image, so for example if someone adds this:

http://imagehosturl.com/i/34njk5n.jpg

But it’s an invalid link, so I need it to show:

http://imagehosturl.com/img/notfound.jpg

Which is like this:

alt text http://tinypic.com/images/404.gif

I do know that .htaccess can do this with it’s ErrorDocument 404, but I have one already when a user access to an invalid page, so it would show the 404 page.

So whenever a user hotlinks an image and it’s invalid or is deleted, I need it to be replaced with the 404 image.

How can I make this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:03:58+00:00Added an answer on May 17, 2026 at 9:03 pm

    Here’s one potential answer:

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteRule \.(gif|jpe?g|png|bmp) /path/to/logo.gif [NC,L]
    

    Another is to use a custom scripted page:

    Use the errorDocument directive
    (documented at [httpd.apache.org ]) to
    point a ‘404’ error to a script (perl,
    PHP, whatever). If the requested file
    has an image extension (or has an
    image/* mimetype; PHP supplies the
    mime_content_type [us2.php.net]
    function for this; I’m sure there are
    many ways to do this in perl; the
    MIME::Types [search.cpan.org] module
    is one way), then set the
    “Content-Type” header to the mimetype
    of your logo image and return the
    content of the logoimage to the
    browser.

    http://www.webmasterworld.com/forum92/3458.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know if this is the right place to ask about that, but
I don't know if this is possible, but it would simplify my calculations to
I don't know how to ask this question properly. I think the title is
I don't know if the Title of this post makes sense, but here's a
Image don't have a click event, but it have a MouseLeftButtonDown, I don't have
Don't have much to say, just can get into the event handler. XAML: <Grid>
Don't know a whole lot about streams. Why does the first version work using
I don't know whether it's Android specific problem or eclipse related problem. My application
I don't know why, I install Xcode 4.0.2 and I run debug on device
I don't think i phrased the question correctly. I am trying to grab all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.