Topic: .htaccess - send default .jpg if requested .jpg isn't found? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=27855" title="Pages that link to Topic: .htaccess - send default .jpg if requested .jpg isn&amp;#039;t found? (Page 1 of 1)" rel="nofollow" >Topic: .htaccess - send default .jpg if requested .jpg isn&#039;t found? <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 04-28-2006 14:45

Greets!

I have a directory with thousands of .jpg files in it. I'm using an AJAX application to grab XML data from the server to display the records.

What I need is an option to display a default .jpg if the request image isn't found on the server.

Normally, I would use PHP to just do a check, but the XML can sometimes be sending out a single page with more than 100 records on it, and I don't want to bog down the server with doing all of the file checks.

Does anyone know how to do this in .htaccess? I tried using an errorDocument declaration, but that doesn't seem to work.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-28-2006 16:32

Guess an ErrorHandler to a php script that then outputs the default jpg (with the appropriate headers) should work?



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu