/* This is an example of an addon that can be used with
   the CHECK-404 REDIRECT_RESPONSE parameter 
*/

parse arg list,servername,verb,tempfile,,
          prog_file,reqnum,verbose,client_ip,privset,,
          uri,host_nickname,id_info,aiter,attribs

parse var list asel '&' anip

asel=sre_packur(translate(asel,' ','+'))

call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 2.0//EN">'
nowtime=sre_datestamp()
call lineout tempfile, "<html><head><title>Request denied</title>"
call lineout tempfile, "</head><body>"
call lineout tempfile,'<h4>Sorry.</h4>'
call lineout tempfile,'Your request for: <tt>'asel'</tt>'
call lineout tempfile,'<br>could not be resolved.<p>'
call lineout tempfile,'<b>Reason:</b> Too many 404 responses were recently sent to <tt> 'anip'</tt>'
call lineout tempfile,'</body></html>'
call lineout tempfile
return 'File erase type text/html auto_etag name 'tempfile

