| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		The Clay Camel -
 
  Joined: 08 Apr 2005 Posts: 4
 
  | 
		
			
				 Posted: Wed Aug 23, 2006 1:52 pm    Post subject: Missing Image Icon | 
				      | 
			 
			
				
  | 
			 
			
				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 | 
		
			           | 
		
	
	
		  | 
	
	
		TRUSTAbyss -
 
  Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
  | 
		
			
				 Posted: Wed Aug 23, 2006 1:56 pm    Post subject:  | 
				      | 
			 
			
				
  | 
			 
			
				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>© <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 | 
		
			           | 
		
	
	
		  | 
	
	
		The Clay Camel -
 
  Joined: 08 Apr 2005 Posts: 4
 
  | 
		
			
				 Posted: Fri Aug 25, 2006 1:02 am    Post subject:  | 
				      | 
			 
			
				
  | 
			 
			
				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 | 
		
			           | 
		
	
	
		  | 
	
	
		 |