Missing Image Icon

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
The Clay Camel
-


Joined: 08 Apr 2005
Posts: 4

PostPosted: Wed Aug 23, 2006 1:52 pm    Post subject: Missing Image Icon Reply with quote

I know one can replace the default "image missing icon" with one more nice image on a pc.

But can this be done through the web server ? Something like the 404 error page.
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Aug 23, 2006 1:56 pm    Post subject: Reply with quote

Yes it can. I use this method on my Server now.

File name: error404.php
Code:
<?php
/**
 * Error 404 Image/HTML Script v1.0
 * Created by: Josh (TRUSTAbyss)
 *
 * Provided by: trustabyss.com
 */
   
$type = $_SERVER["REQUEST_URI"];

if (eregi("\.jp(g|eg)$|\.png$|\.gif$|\.bmp$|\.tiff$", $type)) {

    // Change this Image URI with yours

    header("Location: /images/main/404_image.png");
    exit;
}

$serv = $_SERVER["SERVER_SOFTWARE"];
$year = date("Y");

if (eregi("X1", $serv)) {
    $ver = "X1";
}
else {
    $ver = "X2";
}
?>
<HTML>
<HEAD>
<TITLE>Error 404</TITLE>
</HEAD>
<BODY>
<H1>Error 404</H1>
<P>Not Found</P> <p><HR>Powered by <b><i>Abyss Web Server</i>
</b> <?php echo($ver); ?><br>&copy; <a href="http://www.aprelium.com">
Aprelium Technologies</a> - 2001-<?php echo($year); ?> </p>
</BODY>
</HTML>


Last edited by TRUSTAbyss on Sun Sep 03, 2006 10:14 pm; edited 2 times in total
Back to top View user's profile Send private message Visit poster's website
The Clay Camel
-


Joined: 08 Apr 2005
Posts: 4

PostPosted: Fri Aug 25, 2006 1:02 am    Post subject: Reply with quote

Thanks !

Will try to see if I can use something simular for my web server.

Would be nice for missing covers at the comic book part of my site Xanadu --> http://pjb.hopto.org :-)
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group